[HACKERS] NEXTSTEP compilation fixes, misc.
[HACKERS] NEXTSTEP compilation fixes, misc.
От:
Gregor Hoffleit <flight@mathi.uni-heidelberg.de>
Дата:
Find included below a few patches to help compile the 970608 snapshot with NEXTSTEP. Umm, is there anybody out there who could explain to me the hidden system behind the portability directories ? I.e. NEXTSTEP has no strdup() and no putenv. There's one strdup() implementation in src/backend/port/nextstep/port.c, another one in utils/strdup.c, a third one (pstrdup) in backend/utils/mmgr/palloc.c. putenv gets defined in src/backend/port/nextstep/port.c, but is therefore not available e.g. in src/bin/psql. This looks like rather uncoordinated hacks all over the place. Wouldn't it be more reasonable to have only one utility library that provides all the functions needed for the specific system ? My solution was to hack bin/psql/Makefile to include backend/port/SUBSYS.o instead of the STRDUP conditional. No idea if this breaks anything else. Gregor - --- | Gregor Hoffleit Mathematisches Institut, Uni HD | | flight@mathi.uni-heidelberg.de INF 288, 69120 Heidelberg, Germany | | (NeXTmail, MIME) (49)6221 54-5771 fax 54-8312 | | PGP Key fingerprint = 23 8F B3 38 A3 39 A6 01 5B 99 91 D6 F2 AC CD C7 | - --- src/bin/psql/Makefile.in.ORIG Sun Jun 8 15:23:06 1997 +++ src/bin/psql/Makefile.in Sun Jun 8 15:25:56 1997 @@ -16,15 +16,12 @@ CFLAGS+= -I$(LIBPQDIR) - -OBJS= psql.o stringutils.o @STRDUP@ +OBJS= psql.o stringutils.o all: submake psql psql: $(OBJS) $(LIBPQDIR)/libpq.a - - $(CC) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS) - - - -../../utils/strdup.o: - - $(MAKE) -C ../../utils strdup.o + $(CC) -o psql -L$(LIBPQDIR) ../../backend/port/SUBSYS.o $(OBJS) -lpq $(LDFLAGS) .PHONY: submake submake: - --- src/makefiles/Makefile.nextstep.ORIG Thu Jan 1 01:00:00 1970 +++ src/makefiles/Makefile.nextstep Sun Jun 8 13:58:52 1997 @@ -0,0 +1,1 @@ + - --- src/include/port/nextstep.h.ORIG Sun Jun 8 14:02:20 1997 +++ src/include/port/nextstep.h Sun Jun 8 14:02:11 1997 @@ -16,3 +16,16 @@ # define JMP_BUF # define NO_WAITPID typedef struct mutex slock_t; + +# ifndef BYTE_ORDER +# ifdef __BIG_ENDIAN__ +# define BYTE_ORDER BIG_ENDIAN +# else +# define BYTE_ORDER LITTLE_ENDIAN +# endif +# endif + +# undef FALSE +# define FALSE 0 + +# undef HAVE_TERMIOS_H - --- src/libpq/fe-connect.c.ORIG Sun Jun 8 14:49:16 1997 +++ src/libpq/fe-connect.c Sun Jun 8 14:50:08 1997 @@ -21,6 +21,10 @@ #include #include #include +#if defined(NeXT) +#include +#include +#endif #include #include #include - --- src/backend/libpq/pqcomm.c.ORIG Sun Jun 8 14:13:18 1997 +++ src/backend/libpq/pqcomm.c Sun Jun 8 14:13:48 1997 @@ -43,6 +43,9 @@ #include #include #include +#if defined(NeXT) +#include +#endif #include #include #include ------------------------------
Re: [HACKERS] NEXTSTEP compilation fixes, misc.
От:
"Thomas G. Lockhart" <Thomas.Lockhart@jpl.nasa.gov>
Дата:
Gregor Hoffleit wrote: > > Find included below a few patches to help compile the 970608 snapshot with NEXTSTEP. Gregor, does abstime and datetime work correctly under NEXTSTEP? I'd like to know if NEXTSTEP has POSIX-compatible time zone information available in library calls. It is one of the only systems supported by Postgres which does not currently have USE_POSIX_TIME enabled, but that may not be necessary. Can you try compiling with USE_POSIX_TIME set in include/config.h? Thanks. - Tom ------------------------------