[HACKERS] NEXTSTEP compilation fixes, misc.
| От | Gregor Hoffleit |
|---|---|
| Тема | [HACKERS] NEXTSTEP compilation fixes, misc. |
| Дата | |
| Msg-id | e2b2b018d0001d01edd2ced6361d6407 обсуждение исходный текст |
| Список | pgsql-hackers |
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 <ctype.h>
#include <string.h>
#include <netdb.h>
+#if defined(NeXT)
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
+#endif
#include <netinet/tcp.h>
#include <errno.h>
#include <signal.h>
- --- 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 <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
+#if defined(NeXT)
+#include <netinet/in_systm.h>
+#endif
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
------------------------------
В списке pgsql-hackers по дате отправления: