|
|
|
|
@ -25,57 +25,40 @@
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** libsm C language portability macros |
|
|
|
|
** See libsm/cdefs.html for documentation. |
|
|
|
|
** BSD and Linux already have <sys/cdefs.h> which defines a set of C |
|
|
|
|
** language portability macros that are a defacto standard in the open |
|
|
|
|
** source community. This file allows for building on platforms lacking |
|
|
|
|
** these definitions. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#ifndef HOND_CDEFS_H |
|
|
|
|
# define HOND_CDEFS_H |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** BSD and Linux have <sys/cdefs.h> which defines a set of C language |
|
|
|
|
** portability macros that are a defacto standard in the open source |
|
|
|
|
** community. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
# if HOND_CONF_SYS_CDEFS_H |
|
|
|
|
# include <sys/cdefs.h> |
|
|
|
|
# endif /* HOND_CONF_SYS_CDEFS_H */ |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** Define the standard C language portability macros |
|
|
|
|
** for platforms that lack <sys/cdefs.h>. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
# if !HOND_CONF_SYS_CDEFS_H |
|
|
|
|
# if defined(__cplusplus) |
|
|
|
|
# define __BEGIN_DECLS extern "C" { |
|
|
|
|
# define __END_DECLS }; |
|
|
|
|
# else /* defined(__cplusplus) */ |
|
|
|
|
# define __BEGIN_DECLS |
|
|
|
|
# define __END_DECLS |
|
|
|
|
# endif /* defined(__cplusplus) */ |
|
|
|
|
# if defined(__STDC__) || defined(__cplusplus) |
|
|
|
|
# ifndef __P |
|
|
|
|
# define __P(protos) protos |
|
|
|
|
# endif /* __P */ |
|
|
|
|
# define __CONCAT(x,y) x ## y |
|
|
|
|
# define __STRING(x) #x |
|
|
|
|
# else /* defined(__STDC__) || defined(__cplusplus) */ |
|
|
|
|
# define __P(protos) () |
|
|
|
|
# define __CONCAT(x,y) x/**/y |
|
|
|
|
# define __STRING(x) "x" |
|
|
|
|
# define const |
|
|
|
|
# define signed |
|
|
|
|
# define volatile |
|
|
|
|
# endif /* defined(__STDC__) || defined(__cplusplus) */ |
|
|
|
|
# endif /* !HOND_CONF_SYS_CDEFS_H */ |
|
|
|
|
# if defined(__cplusplus) |
|
|
|
|
# define __BEGIN_DECLS extern "C" { |
|
|
|
|
# define __END_DECLS }; |
|
|
|
|
# else /* defined(__cplusplus) */ |
|
|
|
|
# define __BEGIN_DECLS |
|
|
|
|
# define __END_DECLS |
|
|
|
|
# endif /* defined(__cplusplus) */ |
|
|
|
|
# if defined(__STDC__) || defined(__cplusplus) |
|
|
|
|
# ifndef __P |
|
|
|
|
# define __P(protos) protos |
|
|
|
|
# endif /* __P */ |
|
|
|
|
# define __CONCAT(x,y) x ## y |
|
|
|
|
# define __STRING(x) #x |
|
|
|
|
# else /* defined(__STDC__) || defined(__cplusplus) */ |
|
|
|
|
# define __P(protos) () |
|
|
|
|
# define __CONCAT(x,y) x/**/y |
|
|
|
|
# define __STRING(x) "x" |
|
|
|
|
# define const |
|
|
|
|
# define signed |
|
|
|
|
# define volatile |
|
|
|
|
# endif /* defined(__STDC__) || defined(__cplusplus) */ |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** Define HOND_DEAD, a macro used to declare functions that do not return |
|
|
|
|
** to their caller. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
# ifndef HOND_DEAD |
|
|
|
|
# if __GNUC__ >= 2 |
|
|
|
|
# if __GNUC__ == 2 && __GNUC_MINOR__ < 5 |
|
|
|
|
@ -91,7 +74,6 @@
|
|
|
|
|
/*
|
|
|
|
|
** Define HOND_UNUSED, a macro used to declare variables that may be unused. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
# ifndef HOND_UNUSED |
|
|
|
|
# if __GNUC__ >= 2 |
|
|
|
|
# if __GNUC__ == 2 && __GNUC_MINOR__ < 7 |
|
|
|
|
@ -113,13 +95,13 @@
|
|
|
|
|
** using the "volatile" keyword. If a variable actually is volatile, |
|
|
|
|
** then HOND_NONVOLATILE should not be used. |
|
|
|
|
** |
|
|
|
|
** To compile sendmail with gcc and see all non-bogus warnings, |
|
|
|
|
** you should use |
|
|
|
|
** gcc -O -Wall -DHOND_OMIT_BOGUS_WARNINGS ... |
|
|
|
|
** Do not use -DHOND_OMIT_BOGUS_WARNINGS when compiling the production |
|
|
|
|
** version of sendmail, because there is a performance hit. |
|
|
|
|
** To compile source code with gcc and see all non-bogus warnings use: |
|
|
|
|
** |
|
|
|
|
** gcc -O -Wall -DHOND_OMIT_BOGUS_WARNINGS ... |
|
|
|
|
** |
|
|
|
|
** Do not use -DHOND_OMIT_BOGUS_WARNINGS when compiling production |
|
|
|
|
** software, because there is a performance hit. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
# ifdef HOND_OMIT_BOGUS_WARNINGS |
|
|
|
|
# define HOND_NONVOLATILE volatile |
|
|
|
|
# else /* HOND_OMIT_BOGUS_WARNINGS */ |
|
|
|
|
@ -129,12 +111,11 @@
|
|
|
|
|
/*
|
|
|
|
|
** Turn on format string argument checking. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
# ifndef HOND_CONF_FORMAT_TEST |
|
|
|
|
# if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 |
|
|
|
|
# define HOND_CONF_FORMAT_TEST 1 |
|
|
|
|
# define HOND_CONF_FORMAT_TEST 1 |
|
|
|
|
# else /* __GNUC__ == 2 && __GNUC_MINOR__ >= 7 */ |
|
|
|
|
# define HOND_CONF_FORMAT_TEST 0 |
|
|
|
|
# define HOND_CONF_FORMAT_TEST 0 |
|
|
|
|
# endif /* __GNUC__ == 2 && __GNUC_MINOR__ >= 7 */ |
|
|
|
|
# endif /* HOND_CONF_FORMAT_TEST */ |
|
|
|
|
|
|
|
|
|
@ -155,3 +136,4 @@
|
|
|
|
|
# endif /* ! SCANFLIKE */ |
|
|
|
|
|
|
|
|
|
#endif /* ! HOND_CDEFS_H */ |
|
|
|
|
|
|
|
|
|
|