diff options
author | obrien <obrien@FreeBSD.org> | 1997-01-28 01:43:21 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1997-01-28 01:43:21 +0000 |
commit | 5985edacd19888cf3e60905363adadede2ff5bf6 (patch) | |
tree | a229968de2e038560c938bfd8fe1dc6d85ee7863 /share | |
parent | 1627d472cb8e0b1084672942e6bc0fc952e7d209 (diff) | |
download | FreeBSD-src-5985edacd19888cf3e60905363adadede2ff5bf6.zip FreeBSD-src-5985edacd19888cf3e60905363adadede2ff5bf6.tar.gz |
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.
Diffstat (limited to 'share')
-rw-r--r-- | share/doc/handbook/porting.sgml | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/share/doc/handbook/porting.sgml b/share/doc/handbook/porting.sgml index 1102922..5fc46ca 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: <tscreen><verb> -#ifdef _HAVE_PARAM_H +#ifdef (defined(__unix__) || defined(unix)) #include <sys/param.h> #endif </verb></tscreen> - to the proper place in the <tt>.c</tt> file and add - <tt>-D_HAVE_PARAM_H</tt> to the <tt>CFLAGS</tt> in the - Makefile. + <p>to the proper place in the <tt>.c</tt> 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 + <htmlurl url='mailto:ports@FreeBSD.org' name='ports@FreeBSD.org'>. + <p>Or you can use the GNU Autoconf style of doing this: - Then, you may use: +<tscreen><verb> +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +</verb></tscreen> + + Don't forget to add <tt>-DHAVE_SYS_PARAM_H</tt> to the <tt>CFLAGS</tt> + in the Makefile for this method. + + Once you have <tt><sys/param.h></tt> included, you may use: <tscreen><verb> #if (defined(BSD) && (BSD >= 199103)) |