You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Ian Turner <ia...@sequent.com> on 1999/07/19 06:15:27 UTC

os-sequent/4735: Proper configuration setup and DSO support for Sequent systems

>Number:         4735
>Category:       os-sequent
>Synopsis:       Proper configuration setup and DSO support for Sequent systems
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Sun Jul 18 21:20:00 PDT 1999
>Last-Modified:
>Originator:     iant@sequent.com
>Organization:
apache
>Release:        1.3.7-dev
>Environment:

Sequent DYNIX/ptx systems.
>Description:

   Sequent is looking at providing pre-configured binaries for our customers
to use (along with the source as required by Apache Group). This patch
provides better support for the various release levels of the DYNIX/ptx OS
and provides flexability for future releases.

Patch also provides changes needed for DSO support on Sequent systems.

Would like to see this get into the Apache v1.3.7 Beta and General release.
>How-To-Repeat:

>Fix:
diff -cr apache-1.3/INSTALL apache-1.3_ptx/INSTALL
*** apache-1.3/INSTALL  Wed Jun 23 00:12:32 1999
--- apache-1.3_ptx/INSTALL      Wed Jul 14 10:20:26 1999
***************
*** 82,88 ****
             - Linux     - SunOS         - UnixWare     - Mac OS X Server
             - FreeBSD   - Solaris       - AIX          - Mac OS
             - OpenBSD   - IRIX          - SCO          - OpenStep/Mach
!            - NetBSD    - HPUX          - ReliantUNIX
             - BSDI      - Digital Unix  - DGUX
  
          o Entirely unsupported platforms are:
--- 82,88 ----
             - Linux     - SunOS         - UnixWare     - Mac OS X Server
             - FreeBSD   - Solaris       - AIX          - Mac OS
             - OpenBSD   - IRIX          - SCO          - OpenStep/Mach
!            - NetBSD    - HPUX          - ReliantUNIX  - DYNIX/ptx
             - BSDI      - Digital Unix  - DGUX
  
          o Entirely unsupported platforms are:
diff -cr apache-1.3/src/Configure apache-1.3_ptx/src/Configure
*** apache-1.3/src/Configure    Fri Jun 25 18:12:37 1999
--- apache-1.3_ptx/src/Configure        Wed Jul 14 10:37:40 1999
***************
*** 700,710 ****
        OS='Paragon OSF/1'
        CFLAGS="$CFLAGS -DPARAGON"
        ;;
!     *DYNIX*)
!       DEF_WANTHSREGEX=yes
!       OS='SEQUENT'
!       CFLAGS="$CFLAGS -DSEQUENT"
!       ;;
      *NEWS-OS*)
        DEF_WANTHSREGEX=yes
        OS='SONY NEWS-OS'
--- 700,741 ----
        OS='Paragon OSF/1'
        CFLAGS="$CFLAGS -DPARAGON"
        ;;
!     *-sequent-ptx2.*.*)
!         DEF_WANTHSREGEX=yes
!         OS='SEQUENT DYNIX/ptx v2.*.*'
!         CFLAGS="$CFLAGS -DSEQUENT=20 -Wc,-pw"
!         LIBS="$LIBS -lsocket -linet -lnsl -lc -lseq"
!         ;;
!     *-sequent-ptx4.0.*)
!         DEF_WANTHSREGEX=yes
!         OS='SEQUENT DYNIX/ptx v4.0.*'
!         CFLAGS="$CFLAGS -DSEQUENT=40 -Wc,-pw"
!         LIBS="$LIBS -lsocket -linet -lnsl -lc"
!         ;;
!     *-sequent-ptx4.[123].*)
!         DEF_WANTHSREGEX=yes
!         OS='SEQUENT DYNIX/ptx v4.1.*/v4.2.*'
!         CFLAGS="$CFLAGS -DSEQUENT=41 -Wc,-pw"
!         LIBS="$LIBS -lsocket -lnsl -lc"
!         ;;
!     *-sequent-ptx4.4.*)
!         DEF_WANTHSREGEX=yes
!         OS='SEQUENT DYNIX/ptx v4.4.*'
!         CFLAGS="$CFLAGS -DSEQUENT=44 -Wc,-pw"
!         LIBS="$LIBS -lsocket -lnsl -lc"
!         ;;
!     *-sequent-ptx4.5.*)
!         DEF_WANTHSREGEX=yes
!         OS='SEQUENT DYNIX/ptx v4.5.*'
!         CFLAGS="$CFLAGS -DSEQUENT=45 -Wc,-pw"
!         LIBS="$LIBS -lsocket -lnsl -lc"
!         ;;
!     *-sequent-ptx5.0.*)
!         DEF_WANTHSREGEX=yes
!         OS='SEQUENT DYNIX/ptx v5.0.*'
!         CFLAGS="$CFLAGS -DSEQUENT=50 -Wc,-pw"
!         LIBS="$LIBS -lsocket -lnsl -lc"
!         ;;
      *NEWS-OS*)
        DEF_WANTHSREGEX=yes
        OS='SONY NEWS-OS'
***************
*** 1125,1130 ****
--- 1156,1175 ----
            LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
             SHLIB_SUFFIX_DEPTH=1
             ;;
+         *-sequent-ptx*)
+             case $PLAT in
+                *-sequent-ptx2*)
+                    ;;
+                *-sequent-ptx4.0*)
+                    ;;
+                *-sequent-ptx*)
+                    CFLAGS_SHLIB="-KPIC"
+                    LDFLAGS_SHLIB="-G"
+                    LDFLAGS_SHLIB_EXPORT="-Wl,-Bexport"
+                    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
+                    ;;
+             esac
+             ;;
        RM*-siemens-sysv4*)
            # MIPS hosts can take advantage of the LDFLAGS_SHLIB_EXPORT switch
            case $CC in
***************
*** 1892,1897 ****
--- 1937,1953 ----
        *-ibm-aix* )
            DL_LIB="-lld"
            ;;
+         *-sequent-ptx* )
+             case $PLAT in
+                 *-sequent-ptx2*)
+                     ;;
+                 *-sequent-ptx4.0*)
+                     ;;
+                 *-sequent-ptx*)
+                     DL_LIB="-ldl"
+                     ;;
+             esac
+             ;;
        *-hp-hpux*)
            if ./helpers/TestCompile func shl_load; then
                :
diff -cr apache-1.3/src/helpers/GuessOS apache-1.3_ptx/src/helpers/GuessOS
*** apache-1.3/src/helpers/GuessOS      Mon May  3 18:12:45 1999
--- apache-1.3_ptx/src/helpers/GuessOS  Wed Jul 14 10:42:34 1999
***************
*** 194,202 ****
        echo "${MACHINE}-whatever-unixware212"; exit 0
        ;;
  
!     DYNIX/ptx:4*:*)
!       echo "${MACHINE}-whatever-sysv4"; exit 0
!       ;;
  
      *:4.0:3.0:[345][0-9]?? | *:4.0:3.0:3[34]??[/,]* | library:*)
        echo "x86-ncr-sysv4"; exit 0
--- 194,209 ----
        echo "${MACHINE}-whatever-unixware212"; exit 0
        ;;
  
!     DYNIX/ptx:4*:*:i386)
!         PTXVER=`echo ${VERSION}|sed -e 's/[^.]//'`
!         echo "${MACHINE}-sequent-ptx${PTXVER}"; exit 0
!         ;;
! 
!     *:3.2.0:*:i386)
!         # uname on DYNIX/ptx below V4.0.0 is brain dead
!         PTXVER=`echo ${VERSION}|sed -e 's/[^.]//'`
!         echo "${MACHINE}-sequent-ptx${PTXVER}"; exit 0
!         ;;
  
      *:4.0:3.0:[345][0-9]?? | *:4.0:3.0:3[34]??[/,]* | library:*)
        echo "x86-ncr-sysv4"; exit 0
diff -cr apache-1.3/src/include/ap_config.h apache-1.3_ptx/src/include/ap_config
.h
*** apache-1.3/src/include/ap_config.h  Wed Jun 30 06:12:33 1999
--- apache-1.3_ptx/src/include/ap_config.h      Wed Jul 14 10:46:38 1999
***************
*** 318,328 ****
  typedef int rlim_t;
  
  #elif defined(SEQUENT)
! #define HAVE_GMTOFF 1
! #undef NO_KILLPG
! #define NO_SETSID
! #define NEED_STRDUP
  #define HAVE_SYSLOG 1
  
  #elif defined(NEXT)
  typedef unsigned short mode_t;
--- 318,351 ----
  typedef int rlim_t;
  
  #elif defined(SEQUENT)
! #define DEFAULT_USER "nobody"
! #define DEFAULT_GROUP "nobody"
! #define NO_SHMGET 1
! #define HAVE_MMAP 1
  #define HAVE_SYSLOG 1
+ #define USE_MMAP_FILES 1
+ #define USE_MMAP_SCOREBOARD 1
+ #define USE_FCNTL_SERIALIZED_ACCEPT 1
+ #define JMP_BUF sigjmp_buf
+ #undef NO_SETSID
+ #if SEQUENT < 40
+ typedef int rlim_t;
+ #define NO_GETTIMEOFDAY
+ #undef HAVE_SYS_RESOURCE_H /* exists but does not provide *rlimit funcs */
+ #include <sys/times.h>
+ #endif
+ #if SEQUENT < 42
+ #define NEED_STRCASECMP
+ #define NEED_STRNCASECMP
+ #endif
+ #if SEQUENT < 44
+ #define NO_KILLPG 1
+ #define NET_SIZE_T int
+ #endif
+ #if SEQUENT >= 44
+ #undef NO_KILLPG
+ #define NET_SIZE_T size_t
+ #endif
  
  #elif defined(NEXT)
  typedef unsigned short mode_t;
diff -cr apache-1.3/src/main/http_core.c apache-1.3_ptx/src/main/http_core.c
*** apache-1.3/src/main/http_core.c     Sat Jul  3 06:12:37 1999
--- apache-1.3_ptx/src/main/http_core.c Thu Jul 15 16:10:22 1999
***************
*** 2977,2990 ****
--- 2977,3004 ----
  static int do_nothing(request_rec *r) { return OK; }
  
  #ifdef USE_MMAP_FILES
+ #ifdef SEQUENT
+ /* 
+  * Conflicts with system defined mmap structure on Sequent DYNIX/ptx systems
+  */
+ struct ap_mmap {
+     void *mm;
+     size_t length;
+ };
+ #else
  struct mmap {
      void *mm;
      size_t length;
  };
+ #endif /* SEQUENT */
  
  static void mmap_cleanup(void *mmv)
  {
+ #ifdef SEQUENT
+     struct ap_mmap *mmd = mmv;
+ #else
      struct mmap *mmd = mmv;
+ #endif /* SEQUENT */
  
      if (munmap(mmd->mm, mmd->length) == -1) {
          ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
***************
*** 3147,3153 ****
--- 3161,3171 ----
  #ifdef USE_MMAP_FILES
      }
      else {
+ #ifdef SEQUENT
+       struct ap_mmap *mmd;
+ #else
        struct mmap *mmd;
+ #endif /* SEQUENT */
  
        mmd = ap_palloc(r->pool, sizeof(*mmd));
        mmd->mm = mm;
diff -cr apache-1.3/src/os/unix/os.c apache-1.3_ptx/src/os/unix/os.c
*** apache-1.3/src/os/unix/os.c Mon May  3 18:12:59 1999
--- apache-1.3_ptx/src/os/unix/os.c     Thu Jul 15 15:59:33 1999
***************
*** 109,115 ****
          return NULL;
      return NSLinkModule(image, path, TRUE);
  
! #elif defined(OSF1) ||\
      (defined(__FreeBSD_version) && (__FreeBSD_version >= 220000))
      return dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
  
--- 109,115 ----
          return NULL;
      return NSLinkModule(image, path, TRUE);
  
! #elif defined(OSF1) || defined(SEQUENT) ||\
      (defined(__FreeBSD_version) && (__FreeBSD_version >= 220000))
      return dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
 ***************
*** 160,165 ****
--- 160,168 ----
      retval = dlsym(handle, symbol);
      free(symbol);
      return retval;
+ 
+ #elif defined(SEQUENT)
+     return dlsym(handle, (char *)symname);
  
  #else
      return dlsym(handle, symname);
 
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]