Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd on QNX, use nbutil.h.



details:   https://anonhg.NetBSD.org/src/rev/7fac1675ca45
branches:  trunk
changeset: 339708:7fac1675ca45
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Aug 05 06:50:44 2015 +0000

description:
on QNX, use nbutil.h.

diffstat:

 libexec/httpd/Makefile    |  17 ++++++++++++++++-
 libexec/httpd/bozohttpd.h |   7 ++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diffs (59 lines):

diff -r 04e3dfe0a59b -r 7fac1675ca45 libexec/httpd/Makefile
--- a/libexec/httpd/Makefile    Wed Aug 05 04:11:07 2015 +0000
+++ b/libexec/httpd/Makefile    Wed Aug 05 06:50:44 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.23 2015/04/16 02:32:33 mrg Exp $
+#      $NetBSD: Makefile,v 1.24 2015/08/05 06:50:44 mrg Exp $
 #
 #      $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
 #
@@ -15,6 +15,10 @@
 #      DO_HTPASSWD             /* support .htpasswd files */
 #      NO_LUA_SUPPORT          /* don't support Lua for dynamic content */
 #
+# other system specific defines:
+#      HAVE_NBUTIL_H           /* netbsd compat is in <nbutil.h>
+#                              (don't forget to also enable -lnbutil)
+#
 # these are usually set via the "COPTS" variable, or some other method
 # for setting CFLAGS relevant to your make, eg
 #   % make COPTS="-DDO_HTPASSWD"
@@ -33,6 +37,17 @@
 
 WARNS?=        4
 
+.if defined(.OS.MAKE)
+OPSYS= ${.OS.MAKE}
+.else
+OPSYS:=        ${:!uname -s!:S/-//g:S/\///g}
+.endif
+
+.if ${OPSYS} == "QNX"
+CPPFLAGS+=     -DHAVE_NBUTIL_H
+LDADD+=                -lnbutil
+.endif
+
 .include <bsd.own.mk>
 
 .if ${MKCRYPTO} != "no"
diff -r 04e3dfe0a59b -r 7fac1675ca45 libexec/httpd/bozohttpd.h
--- a/libexec/httpd/bozohttpd.h Wed Aug 05 04:11:07 2015 +0000
+++ b/libexec/httpd/bozohttpd.h Wed Aug 05 06:50:44 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bozohttpd.h,v 1.35 2015/05/02 11:35:48 mrg Exp $       */
+/*     $NetBSD: bozohttpd.h,v 1.36 2015/08/05 06:50:44 mrg Exp $       */
 
 /*     $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $       */
 
@@ -41,6 +41,11 @@
 #endif
 #include <stdio.h>
 
+/* QNX provides a lot of NetBSD things in nbutil.h */
+#ifdef USE_NBUTIL
+#include <nbutil.h>
+#endif
+
 /* lots of "const" but gets free()'ed etc at times, sigh */
 
 /* headers */



Home | Main Index | Thread Index | Old Index