From c4ed977f90b6b3d87c4a5fdfeb6179d2d691d39d Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 28 Jan 1997 01:43:21 +0000 Subject: [PATCH] Document the "#if (defined(__unix__) || defined(unix))" way of including sys/param.h. Change _HAVE_PARAM_H to "HAVE_SYS_PARAM_H" for those who still like this method -- leading underscores are in the compiler/library name space and the Ollivier says to follow GNU Autoconf anyway. --- share/doc/handbook/porting.sgml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/share/doc/handbook/porting.sgml b/share/doc/handbook/porting.sgml index 1102922c70a4..5fc46ca7c872 100644 --- a/share/doc/handbook/porting.sgml +++ b/share/doc/handbook/porting.sgml @@ -49,16 +49,27 @@ the ports collection. is already included; if not, add the code: -#ifdef _HAVE_PARAM_H +#ifdef (defined(__unix__) || defined(unix)) #include #endif - to the proper place in the .c file and add - -D_HAVE_PARAM_H to the CFLAGS in the - Makefile. +

to the proper place in the .c file. We believe that every + system that defineds these to symbols has sys/param.h. If you find + a system that doesn't, we would like to know. Please send mail to + . +

Or you can use the GNU Autoconf style of doing this: - Then, you may use: + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + + + Don't forget to add -DHAVE_SYS_PARAM_H to the CFLAGS + in the Makefile for this method. + + Once you have <sys/param.h> included, you may use: #if (defined(BSD) && (BSD >= 199103))