version 1.1.1.2, 2012/05/29 12:26:49
|
version 1.1.1.3, 2012/10/09 09:29:52
|
Line 29
|
Line 29
|
* Macros and functions that may be missing on some operating systems. |
* Macros and functions that may be missing on some operating systems. |
*/ |
*/ |
|
|
|
#ifndef __GNUC_PREREQ__ |
|
# ifdef __GNUC__ |
|
# define __GNUC_PREREQ__(ma, mi) \ |
|
((__GNUC__ > (ma)) || (__GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))) |
|
# else |
|
# define __GNUC_PREREQ__(ma, mi) 0 |
|
# endif |
|
#endif |
|
|
/* Define away __attribute__ for non-gcc or old gcc */ |
/* Define away __attribute__ for non-gcc or old gcc */ |
#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5 | #if !defined(__attribute__) && !__GNUC_PREREQ__(2, 5) |
# define __attribute__(x) |
# define __attribute__(x) |
#endif |
#endif |
|
|
/* For catching format string mismatches */ |
/* For catching format string mismatches */ |
#ifndef __printflike |
#ifndef __printflike |
# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7) | # if __GNUC_PREREQ__(2, 7) |
# define __printflike(f, v) __attribute__((__format__ (__printf__, f, v))) |
# define __printflike(f, v) __attribute__((__format__ (__printf__, f, v))) |
# else |
# else |
# define __printflike(f, v) |
# define __printflike(f, v) |
# endif |
# endif |
#endif |
#endif |
|
|
|
#ifndef __dso_public |
|
# ifdef HAVE_DSO_VISIBILITY |
|
# if defined(__GNUC__) |
|
# define __dso_public __attribute__((__visibility__("default"))) |
|
# define __dso_hidden __attribute__((__visibility__("hidden"))) |
|
# elif defined(__SUNPRO_C) |
|
# define __dso_public __global |
|
# define __dso_hidden __hidden |
|
# else |
|
# define __dso_public __declspec(dllexport) |
|
# define __dso_hidden |
|
# endif |
|
# else |
|
# define __dso_public |
|
# define __dso_hidden |
|
# endif |
|
#endif |
|
|
/* |
/* |
* Some systems lack full limit definitions. |
* Some systems lack full limit definitions. |
*/ |
*/ |
Line 257 extern int errno;
|
Line 284 extern int errno;
|
# endif |
# endif |
#endif |
#endif |
|
|
|
/* For sig2str() */ |
|
#ifndef SIG2STR_MAX |
|
# define SIG2STR_MAX 32 |
|
#endif |
|
|
#ifndef WCOREDUMP |
#ifndef WCOREDUMP |
# define WCOREDUMP(x) ((x) & 0x80) |
# define WCOREDUMP(x) ((x) & 0x80) |
#endif |
#endif |
Line 348 int unsetenv(const char *);
|
Line 380 int unsetenv(const char *);
|
#endif |
#endif |
#ifndef HAVE_STRSIGNAL |
#ifndef HAVE_STRSIGNAL |
char *strsignal(int); |
char *strsignal(int); |
|
#endif |
|
#ifndef HAVE_SIG2STR |
|
int sig2str(int, char *); |
#endif |
#endif |
|
|
#endif /* _SUDO_MISSING_H */ |
#endif /* _SUDO_MISSING_H */ |