www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject os-qnx/684
Date Sun, 08 Jun 1997 22:20:01 GMT
The following reply was made to PR os-qnx/684; it has been noted by GNATS.

From: Marc Slemko <marcs@znep.com>
To: apbugs@apache.org
Subject: os-qnx/684
Date: Sun, 8 Jun 1997 16:19:58 -0600 (MDT)

 
 
 
 ---------- Forwarded message ----------
 Date: Mon, 9 Jun 1997 01:21:02 +0400
 From: Igor N Kovalenko <infoh@mail.wplus.net>
 To: marc@hyperreal.com
 Subject: Re: Changed information for PR os-qnx/684
 
 > From: marc@hyperreal.com
 > To: apache-bugdb@apache.org; infoh@mail.wplus.net; marc@apache.org
 > Subject: Changed information for PR os-qnx/684
 > Date: Sunday, June 08, 1997 11:45
 > 
 > Synopsis: broken compilation of utils from support directory
 > 
 > State-Changed-From-To: open-analyzed
 > State-Changed-By: marc
 > State-Changed-When: Sun Jun  8 12:45:02 PDT 1997
 > State-Changed-Why:
 > Why does it neeed -lunix?
 
 Because some popular Unix stuff is not in libc in QNX. E.g., a function to
 get password from command line without echo (don't remember its name) is in
 unix.lib.
 
 > That isn't included in the src 
 > directory; what does it choke on if it doesn't have it?
 > 
 
 Perhaps because the rest of Apache code don't use functions which are not
 in libc in QNX. However, it is not good idea to rely on this luck further.
 Generally, only POSIX functions are in libc in QNX.
 
 > suexec.c already does include sys/types.h and has forever.
 > 
 
 Thas was my err - I just included my stuff above, so compiler complained
 :-(
 
 > Please verify this against 1.2.0 and then send the 
 > diffs required to make it work for you...
 > 
 
 
 Well, I did it - that all (except for sys/types.h) applies to 1.2.0 as
 well.
 You probably aware about another my report - about mmap() support. I
 include appropriate stuff here, FYI. If something is unclear, please ask.
 
 Affected files:
 src/Configure		-- required to generate proper Makefile for support dir.
 src/conf.h			-- mmap definitions for QNX
 src/http_main.c		-- mmap handling for QNX
 support/Makefile.tmpl	-- for htdigest.c
 support/suexec.c		-- for itself
 
 Output of diff my_version apache1.2.0-version:
 
 === src/Configure.diff - cut here ===
 335c335
 < 	LIBS="$LIBS -N128k -lsocket -lunix"
 ---
 > 	LIBS="$LIBS -N128k -lsocket"
 341c341
 < 	LIBS="$LIBS -N128k -lsocket -lunix"
 ---
 > 	LIBS="$LIBS -N128k -lsocket"
 === end - cut here ===
 
 === src/conf.h.diff - cut here ===
 429,430d428
 < #define HAVE_MMAP
 < #include <sys/mman.h>
 === end - cut here ===
 
 === src/http_main.c.diff - cut here ===
 688,718d687
 < #elif defined(QNX)
 < /* 
 <  * POSIX 1003.4 style
 <  *
 <  * June 5, 1997, 
 <  * Igor N. Kovalenko -- infoh@mail.wplus.net
 <  *
 <  * Note: 
 <  * As of version 4.23, shared memory in QNX must reside under /dev/shmem.
 <  * POSIX shm_open() and shm_unlink() will take care about this issue.
 <  * 
 <  * Note also: <sys/mman.h> should be included for QNX into conf.h.
 <  */
 <     int fd;
 < 
 < 	if ((fd = shm_open(scoreboard_fname, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR ))
 == -1) {
 < 		  perror("httpd: could not open(create) scoreboard");
 < 		  exit(1);
 < 	}
 < 	if (ltrunc(fd, (off_t)SCOREBOARD_SIZE, SEEK_SET) == -1) {
 < 		  perror("httpd: could not ltrunc scoreboard");
 < 		  shm_unlink(scoreboard_fname);
 < 		  exit(1);
 < 	}
 < 	if ((m = (caddr_t)mmap((caddr_t)0, (size_t)SCOREBOARD_SIZE,
 PROT_READ|PROT_WRITE,
 < 		  MAP_SHARED, fd, (off_t)0)) == (caddr_t)-1) {
 < 		  perror("httpd: cannot mmap scoreboard");
 < 		  shm_unlink(scoreboard_fname);
 < 		  exit(1);
 < 	}
 <     close(fd);
 952,953d920
 < #elif defined(QNX) && defined(HAVE_MMAP)
 < 	shm_unlink(scoreboard_fname);
 === end - cut here ===
 
 === support/Makefile.tmpl - cut here ===
 22c22
 < 	$(CC) $(CFLAGS) htdigest.c -o htdigest $(LIBS)
 ---
 > 	$(CC) $(CFLAGS) htdigest.c -o htdigest
 === end - cut here ===
 
 === support/suexec.c.diff - cut here ===
 84,101d83
 < /*
 <  ***********************************************************************
 <  * There is no initgroups() in QNX, so I believe this is safe :-)
 <  * Use cc -osuexec -3 -O -mf -DQNX suexec.c to compile.
 <  *
 <  * May 17, 1997.
 <  * Igor N. Kovalenko -- infoh@mail.wplus.net
 <  ***********************************************************************
 <  */
 < 
 < #if defined(QNX)
 < int initgroups(const char *name, gid_t basegid)
 < {
 < /* QNX and MPE do not appear to support supplementary groups. */
 < 	return 0;
 < }
 < #endif
 < 
 === end - cut here ===
 
 With above changes applied to fresh 1.2.0 everything complies and works ok
 on QNX 4.23A, using Watcom C 10.6
 
 Regards,
 ---
 Igor N Kovalenko
 

Mime
View raw message