mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
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.
This commit is contained in:
parent
21eab473b3
commit
c4ed977f90
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22046
1 changed files with 16 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue