Hi all.

After two days of strugle I have compiled pgsql on ultrix, patch is in
attachment. I still can't run `gmake check', because of shell problems
in install.log:

install:        no destination specified
gmake[6]: *** [install-lib-shared] Error 1
gmake[6]: Leaving directory
`/tmp_mnt/hosts/wisdom/NewSoftware/Ask/build/pgsql/src/interfaces/libpq'

With the speed of the box it will take another two days to fix and
check :-)

First problem is sys/socket.h. Here it has no guards in it (like 
#ifdef _SOCKET_H
#endif), so it could not be included twice, and I have to remove its
unnecesarry inclusions.

I have to add src/utils/strdup.o to linking in
src/interfaces/ecpg/preproc and /src/bin/pg_passwd
and I don't shure how to do it in patch (so, it is not there).

.frame in s_lock.c cause error about duplication of .frame for one .ent,
so I just remove it -- and I don't shure I am right. Anybody know how to
deal with it?

sys/ipc.h included from miscadmin.h is needed for sys/sem.h, so I reorder
their inclusion.

There is no dynamic libraries for Ultrix, so I have to download libdl, but
it is not supported by configure (I guess), so I add
LIBS += -L/home/ask/soft/build/libdl -ldl
it is obviously wrong -- should be changed.

BTW: Do anybody know about tool, helping to analize include structure, in
order to eliminate several includes of one file (like case with
sys/socket.h which is unneeded for everybody, who includes libpq-be.h)

Regards,
ASK
Index: src/backend/libpq/hba.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq/hba.c,v
retrieving revision 1.55
diff -C2 -r1.55 hba.c
*** src/backend/libpq/hba.c     2001/02/10 02:31:26     1.55
--- src/backend/libpq/hba.c     2001/03/27 16:57:07
***************
*** 14,18 ****
  #include <sys/types.h>
  #include <fcntl.h>
- #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
--- 14,17 ----
Index: src/backend/libpq/pqcomm.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq/pqcomm.c,v
retrieving revision 1.117
diff -C2 -r1.117 pqcomm.c
*** src/backend/libpq/pqcomm.c  2001/03/22 03:59:30     1.117
--- src/backend/libpq/pqcomm.c  2001/03/27 16:57:09
***************
*** 68,72 ****
  #include <sys/types.h>
  #include <sys/stat.h>
- #include <sys/socket.h>
  #include <netdb.h>
  #include <netinet/in.h>
--- 68,71 ----
Index: src/backend/libpq/pqpacket.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq/pqpacket.c,v
retrieving revision 1.29
diff -C2 -r1.29 pqpacket.c
*** src/backend/libpq/pqpacket.c        2001/03/22 03:59:30     1.29
--- src/backend/libpq/pqpacket.c        2001/03/27 16:57:09
***************
*** 17,21 ****
  #include <unistd.h>
  #include <sys/types.h>
- #include <sys/socket.h>
  #include <netdb.h>
  #include <netinet/in.h>
--- 17,20 ----
Index: src/backend/port/dynloader/ultrix4.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v
retrieving revision 1.13
diff -C2 -r1.13 ultrix4.c
*** src/backend/port/dynloader/ultrix4.c        2001/02/10 02:31:26     1.13
--- src/backend/port/dynloader/ultrix4.c        2001/03/27 16:57:10
***************
*** 15,20 ****
  #include "postgres.h"
  
! #include "dl.h"
  #include "utils/dynamic_loader.h"
  
  extern char pg_pathname[];
--- 15,23 ----
  #include "postgres.h"
  
! #include "dynloader.h"
  #include "utils/dynamic_loader.h"
+ 
+ extern void *dl_open(char *filename, int mode);
+ extern int dl_init(char* filename);
  
  extern char pg_pathname[];
Index: src/backend/port/dynloader/ultrix4.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/port/dynloader/ultrix4.h,v
retrieving revision 1.7
diff -C2 -r1.7 ultrix4.h
*** src/backend/port/dynloader/ultrix4.h        2001/01/24 19:43:04     1.7
--- src/backend/port/dynloader/ultrix4.h        2001/03/27 16:57:10
***************
*** 105,114 ****
  
  /*
!  * prototypes for the dl* interface
   */
! extern void *dl_open( /* char *filename, int mode */ );
! extern void *dl_sym( /* void *handle, char *name */ );
! extern void dl_close( /* void *handle */ );
! extern char *dl_error( /* void */ );
  
  #define   DL_LAZY             0               /* lazy resolution */
--- 105,114 ----
  
  /*
!  * PostgreSQL names of dl* functions. Prototypes will be declared in
!  * dynamic_loader.h
   */
! #define pg_dlsym              dl_sym
! #define pg_dlclose            dl_close
! #define pg_dlerror            dl_error
  
  #define   DL_LAZY             0               /* lazy resolution */
Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.211
diff -C2 -r1.211 postmaster.c
*** src/backend/postmaster/postmaster.c 2001/03/22 03:59:43     1.211
--- src/backend/postmaster/postmaster.c 2001/03/27 16:57:12
***************
*** 60,64 ****
  #include <sys/stat.h>
  #include <sys/time.h>
- #include <sys/socket.h>
  #include <errno.h>
  #include <fcntl.h>
--- 60,63 ----
Index: src/backend/storage/buffer/s_lock.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/storage/buffer/s_lock.c,v
retrieving revision 1.36
diff -C2 -r1.36 s_lock.c
*** src/backend/storage/buffer/s_lock.c 2001/03/27 01:16:24     1.36
--- src/backend/storage/buffer/s_lock.c 2001/03/27 16:57:12
***************
*** 235,241 ****
        __asm__         __volatile__(
                                                                                "\
! .global       tas                                             \n\
  tas:                                                  \n\
-                       .frame  $sp, 0, $31     \n\
                        ll              $14, 0($4)      \n\
                        or              $15, $14, 1     \n\
--- 235,240 ----
        __asm__         __volatile__(
                                                                                "\
! .globl        tas                                             \n\
  tas:                                                  \n\
                        ll              $14, 0($4)      \n\
                        or              $15, $14, 1     \n\
Index: src/backend/storage/ipc/spin.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/storage/ipc/spin.c,v
retrieving revision 1.32
diff -C2 -r1.32 spin.c
*** src/backend/storage/ipc/spin.c      2001/03/22 03:59:45     1.32
--- src/backend/storage/ipc/spin.c      2001/03/27 16:57:13
***************
*** 22,30 ****
  
  #include <errno.h>
  #if !defined(HAS_TEST_AND_SET) && defined(HAVE_SYS_SEM_H)
  #include <sys/sem.h>
  #endif
  
- #include "miscadmin.h"
  #include "storage/proc.h"
  #include "storage/s_lock.h"
--- 22,31 ----
  
  #include <errno.h>
+ 
+ #include "miscadmin.h" /* Should be before sys/sem.h */
  #if !defined(HAS_TEST_AND_SET) && defined(HAVE_SYS_SEM_H)
  #include <sys/sem.h>
  #endif
  
  #include "storage/proc.h"
  #include "storage/s_lock.h"
Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/tcop/postgres.c,v
retrieving revision 1.217
diff -C2 -r1.217 postgres.c
*** src/backend/tcop/postgres.c 2001/03/26 17:00:54     1.217
--- src/backend/tcop/postgres.c 2001/03/27 16:57:16
***************
*** 26,30 ****
  #include <sys/types.h>
  #include <fcntl.h>
- #include <sys/socket.h>
  #include <errno.h>
  #if HAVE_SYS_SELECT_H
--- 26,29 ----
Index: src/include/port/ultrix4.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/port/ultrix4.h,v
retrieving revision 1.8
diff -C2 -r1.8 ultrix4.h
*** src/include/port/ultrix4.h  2000/10/29 13:17:34     1.8
--- src/include/port/ultrix4.h  2001/03/27 16:57:24
***************
*** 67,71 ****
  extern int    ftruncate(int, off_t);
  
! extern char *crypt(char *, char *);
  
  /* End of ultrix4.h */
--- 67,71 ----
  extern int    ftruncate(int, off_t);
  
! extern char *crypt(const char *, const char *);
  
  /* End of ultrix4.h */
Index: src/interfaces/libpq/fe-connect.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v
retrieving revision 1.163
diff -C2 -r1.163 fe-connect.c
*** src/interfaces/libpq/fe-connect.c   2001/03/23 04:49:57     1.163
--- src/interfaces/libpq/fe-connect.c   2001/03/27 16:57:32
***************
*** 28,32 ****
  #include "win32.h"
  #else
- #include <sys/socket.h>
  #include <unistd.h>
  #include <netdb.h>
--- 28,31 ----
Index: src/makefiles/Makefile.ultrix4
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.ultrix4,v
retrieving revision 1.4
diff -C2 -r1.4 Makefile.ultrix4
*** src/makefiles/Makefile.ultrix4      2000/10/21 22:36:13     1.4
--- src/makefiles/Makefile.ultrix4      2001/03/27 16:57:37
***************
*** 6,9 ****
--- 6,11 ----
  CFLAGS_SL = -G 0
  
+ LIBS += -L/home/ask/soft/build/libdl -ldl
+ 
  %.so: %.c
        $(CC) -c -G 0 $(CPPFLAGS) $(CFLAGS) -o $@ $<

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to