Re: SunOS4 - Mailing list pgsql-hackers
From | Peter Eisentraut |
---|---|
Subject | Re: SunOS4 |
Date | |
Msg-id | Pine.LNX.4.30.0102211713590.1381-100000@peter.localdomain Whole thread Raw |
In response to | SunOS4 (Tatsuo Ishii <t-ishii@sra.co.jp>) |
Responses |
Re: SunOS4
Re: SunOS4 |
List | pgsql-hackers |
Tatsuo Ishii writes: > o c.h 's sunos4 part should not include varargs.h. (Tom has already > fixed it) Instead, stdlib.h and stdarg.h should be included. This should be okay by now. > o no RAND_MAX or EXIT_FAILURE found. I simply added them to c.h. EXIT_FAILURE is defined in src/bin/psql/settings.h; I can't find it used outside psql. RAND_MAX should be inside an #ifndef RAND_MAX, not in a SunOS specific section. > o regex/utils.h included twice somewhere. I added #ifndef > UTILS_H... to utils.h Okay. > o utils/adt/formatting.c rely on sprintf() returns length of formatted > strings. This is not true for SunOS4. I have changed sprintf to > snprintf. Okay. > o SunOS4 does not have strdup, strtoul. --> use backend/port/strtoul.c > etc. Okay. Instead of ../../etc. in makefiles you should use $(top_srcdir) or $(top_builddir). > o SunOS4 does not have atexit (used in psql). --> igore it Maybe on_exit() is available, or even more portable? > o SunOS4 does not have getopt. --> use utils/getopt.c. also getopt.h > need to be created, and checking for getopt is needed to configure.in. Ugh. #include "../../utils/getopt.h" is definitely not good. + #ifndef HAVE_GETOPT_H + char *__progname = "pg_id"; + #endif seems to be misguided. The getopt.h file doesn't seem necessary. The external variables should be defined in every program that needs them. The getopt() function doesn't need to be declared. > o to make shared library I have added an entry for SunOS4 in > Makefile.shlib. I'm not sure that entry is right. Libtool wants it to look like $(LD) -assert pure-text -Bshareable you have $(LD) -dc -dp -Bdynamic > > o to make shared libraries (such as libpgeasy.so) relying on libpq, > "ld foo.o bar.o ... -L ../libpq -lpq" is executed but fails. I > changed it to: > ld foo.o bar.o ... ../libpq.a > instead. Can you elaborate on why that's necessary? Perhaps a problem with the command line (see above)? Why only ecpg? > o pg_id needs Makefile.in. Nothing needs a Makefile.in. Substitution symbols go in Makefile.global. > included are patched for *7.0.x*. Sould I make same changes to 7.1? > Comments anyone? 7.0 build patches are pretty much useless for 7.1, I'm afraid. You should work with 7.1 before proceeding. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
pgsql-hackers by date: