Additional UnixWare 7 patches for latest snapshot.

Started by Billy G. Allieover 27 years ago1 messages
#1Billy G. Allie
Bill.Allie@mug.org

Here are additional patches for the UnixWare 7 port.

Summary of changes:

In pqcomm.h, use the SUN_LEN macro if it is defined to calculate the size of
the sockaddr_un structure.

In unixware.h, drop the use of the UNIXWARE macro. Everything can be handled
with the USE_UNIVEL_CC and DISABLE_COMPLEX_MACRO macros.

In s_lock.h, remove the reference to the UNIXWARE macro (see above).

In the unixware template, add the YFLAGS:-d line.

In various makefile templates, add (or cleanup) unixware and univel port
specific information.

*** src/include/libpq/pqcomm.h.orig	Fri Jul 24 19:08:59 1998
--- src/include/libpq/pqcomm.h	Fri Jul 24 19:10:07 1998
***************
*** 34,42 ****
--- 34,47 ----

/* Configure the UNIX socket address for the well known port. */

+ #if defined(SUN_LEN)
  #define UNIXSOCK_PATH(sun,port) \
+  	(sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), SUN_LEN(&(sun)))
+ #else
+ #define UNIXSOCK_PATH(sun,port) \
   	(sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), \
   	 strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))
+ #endif
  /*
   *		We do this because sun_len is in BSD's struct, while others don't.
*** src/include/port/unixware.h.orig	Fri Jul 24 19:08:59 1998
--- src/include/port/unixware.h	Fri Jul 24 19:10:07 1998
***************
*** 5,16 ****

#define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM
/***************************************
* Define this if you are compiling with
* the native UNIXWARE C compiler.
***************************************/
! #define UNIXWARE
typedef unsigned char slock_t;

  /***************************************************************
   * The following include will get the needed prototype for the 
--- 5,20 ----

#define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM
+
/***************************************
* Define this if you are compiling with
* the native UNIXWARE C compiler.
***************************************/
! #define USE_UNIVEL_CC
!
typedef unsigned char slock_t;
+
+ #define DISABLE_COMPLEX_MACRO

  /***************************************************************
   * The following include will get the needed prototype for the 
*** src/include/storage/s_lock.h.orig	Fri Jul 24 19:08:59 1998
--- src/include/storage/s_lock.h	Fri Jul 24 19:10:07 1998
***************
*** 188,194 ****
  #if defined(NEED_I386_TAS_ASM)
  /* non gcc i386 based things */

! #if defined(USE_UNIVEL_CC) || defined(UNIXWARE)
#define TAS(lock) tas(lock)

  asm int 
--- 188,194 ----
  #if defined(NEED_I386_TAS_ASM)
  /* non gcc i386 based things */

! #if defined(USE_UNIVEL_CC)
#define TAS(lock) tas(lock)

asm int
***************
*** 203,209 ****
popl %ebx
}

! #endif /* USE_UNIVEL_CC || UNIXWARE */

#endif /* NEED_I386_TAS_ASM */

--- 203,209 ----
  	popl	%ebx
  }

! #endif /* USE_UNIVEL_CC */

#endif /* NEED_I386_TAS_ASM */

*** src/interfaces/libpgtcl/Makefile.in.orig	Fri Jul 24 19:09:00 1998
--- src/interfaces/libpgtcl/Makefile.in	Fri Jul 24 19:10:08 1998
***************
*** 66,71 ****
--- 66,78 ----
    CFLAGS		+= $(CFLAGS_SL)
  endif
+ ifeq ($(PORTNAME), unixware)
+   install-shlib-dep	:= install-shlib
+   shlib			:= libpgtcl.so.1
+   LDFLAGS_SL		= -G -z text
+   CFLAGS		+= $(CFLAGS_SL)
+ endif
+ 
  ifeq ($(PORTNAME), univel)
    install-shlib-dep	:= install-shlib
    shlib			:= libpgtcl.so.1
*** src/interfaces/libpq/c.h.orig	Sat Jul 25 00:18:45 1998
--- src/interfaces/libpq/c.h	Sat Jul 25 00:19:15 1998
***************
*** 63,70 ****
  #define false	((char) 0)
  #define true	((char) 1)
  #ifndef __cplusplus
  typedef char bool;
! 
  #endif							/* not C++ */
  typedef bool *BoolPtr;
--- 63,71 ----
  #define false	((char) 0)
  #define true	((char) 1)
  #ifndef __cplusplus
+ #ifndef bool
  typedef char bool;
! #endif
  #endif							/* not C++ */
  typedef bool *BoolPtr;
*** src/interfaces/libpq/Makefile.in.orig	Fri Jul 24 19:09:00 1998
--- src/interfaces/libpq/Makefile.in	Fri Jul 24 19:10:08 1998
***************
*** 73,81 ****
    CFLAGS += $(CFLAGS_SL)
  endif
  ifeq ($(PORTNAME), univel)
    install-shlib-dep := install-shlib
!   shlib := libpq.so.1
    LDFLAGS_SL = -G -z text
    CFLAGS += $(CFLAGS_SL)
  endif
--- 73,88 ----
    CFLAGS += $(CFLAGS_SL)
  endif
+ ifeq ($(PORTNAME), unixware)
+   install-shlib-dep := install-shlib
+   shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+   LDFLAGS_SL = -G -z text
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
  ifeq ($(PORTNAME), univel)
    install-shlib-dep := install-shlib
!   shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
    LDFLAGS_SL = -G -z text
    CFLAGS += $(CFLAGS_SL)
  endif
*** src/interfaces/libpq++/Makefile.orig	Fri Jul 24 19:09:00 1998
--- src/interfaces/libpq++/Makefile	Fri Jul 24 19:10:08 1998
***************
*** 56,61 ****
--- 56,75 ----
    CFLAGS += $(CFLAGS_SL)
  endif
+ ifeq ($(PORTNAME), unixware)
+   install-shlib-dep := install-shlib
+   shlib := libpq.so.1
+   LDFLAGS_SL = -G -z text
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
+ ifeq ($(PORTNAME), univel)
+   install-shlib-dep := install-shlib
+   shlib := libpq.so.1
+   LDFLAGS_SL = -G -z text
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
  ifeq ($(PORTNAME), hpux)
    install-shlib-dep := install-shlib
    shlib := libpq.sl
*** src/template/unixware.orig	Fri Jul 24 19:09:00 1998
--- src/template/unixware	Fri Jul 24 19:10:08 1998
***************
*** 1,8 ****
  AROPT:crs
  CFLAGS:-Xa -v -O -K i486,host,inline,loop_unroll,alloca -Dsvr4
  SHARED_LIB:-K PIC
! SRCH_INC:
! SRCH_LIB:
  USE_LOCALE:no
  DLSUFFIX:.so
  CC:cc
--- 1,9 ----
  AROPT:crs
  CFLAGS:-Xa -v -O -K i486,host,inline,loop_unroll,alloca -Dsvr4
  SHARED_LIB:-K PIC
! SRCH_INC:/opt/include
! SRCH_LIB:/opt/lib
  USE_LOCALE:no
  DLSUFFIX:.so
  CC:cc
+ YFLAGS:-d

--
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |