summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2008-09-27 17:52:05 +0000
committerAndreas Baumann <abaumann@yahoo.com>2008-09-27 17:52:05 +0000
commit6b1b9863d8fccfe09c2f72c68e1ebfeea54efbe8 (patch)
tree0c4e761c5b5aad7010c210a4519a2a72760af55d /src/port
parenteedc9cd68aef078e4584e43d8055d70e1fa07351 (diff)
downloadnagios-plugin-curl-6b1b9863d8fccfe09c2f72c68e1ebfeea54efbe8.tar.gz
nagios-plugin-curl-6b1b9863d8fccfe09c2f72c68e1ebfeea54efbe8.tar.bz2
- added first runnig version
Diffstat (limited to 'src/port')
-rw-r--r--src/port/sys.h119
-rw-r--r--src/port/unused.h8
2 files changed, 127 insertions, 0 deletions
diff --git a/src/port/sys.h b/src/port/sys.h
new file mode 100644
index 0000000..65b68e2
--- /dev/null
+++ b/src/port/sys.h
@@ -0,0 +1,119 @@
+#if defined LINUX
+#if OS_MAJOR_VERSION == 2
+#if OS_MINOR_VERSION == 6
+#define _XOPEN_SOURCE 600
+#define HAVE_STDBOOL_H
+#define HAVE_STDINT_H
+#define HAVE_VSNPRINTF
+#define HAVE_SNPRINTF
+#define HAVE_VASPRINTF
+#define HAVE_ASPRINTF
+#define HAVE_STRDUP
+#define HAVE_LOCKF
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION == 6 */
+#else
+ #error unknown platform
+#endif /* defined OS_MAJOR_VERSION == 2 */
+#endif /* defined LINUX */
+
+#if defined FREEBSD
+#if OS_MAJOR_VERSION == 7
+#if OS_MINOR_VERSION == 0
+#define _XOPEN_SOURCE 600
+#define HAVE_STDBOOL_H
+#define HAVE_STDINT_H
+#define HAVE_VSNPRINTF
+#define HAVE_SNPRINTF
+#define HAVE_VASPRINTF
+#define HAVE_ASPRINTF
+#define HAVE_STRDUP
+#define HAVE_LOCKF
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION == 0 */
+#else
+#if OS_MAJOR_VERSION == 6
+#if OS_MINOR_VERSION == 2
+#define _XOPEN_SOURCE 600
+#define HAVE_STDBOOL_H
+#define HAVE_STDINT_H
+#define HAVE_VSNPRINTF
+#define HAVE_SNPRINTF
+#define HAVE_STRDUP
+#define HAVE_LOCKF
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION == 2 */
+#else
+ #error unknown platform
+#endif /* defined OS_MAJOR_VERSION == 6 */
+#endif /* defined OS_MAJOR_VERSION == 7 */
+#endif /* defined FREEBSD */
+
+#if defined OPENBSD
+#if OS_MAJOR_VERSION == 4
+#if OS_MINOR_VERSION >= 2 && OS_MINOR_VERSION <= 3
+#define _XOPEN_SOURCE 600
+#define HAVE_STDBOOL_H
+#define HAVE_STDINT_H
+#define HAVE_VSNPRINTF
+#define HAVE_SNPRINTF
+#define HAVE_VASPRINTF
+#define HAVE_ASPRINTF
+#define HAVE_STRDUP
+#define HAVE_LOCKF
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION >= 2 && OS_MINOR_VERSION <= 3 */
+#else
+ #error unknown platform
+#endif /* defined OS_MAJOR_VERSION == 4 */
+#endif /* defined OPENBSD */
+
+#if defined SUNOS
+#if OS_MAJOR_VERSION == 5
+#if OS_MINOR_VERSION == 8
+#if !defined __cplusplus
+#define _XOPEN_SOURCE 600
+#define __EXTENSIONS__
+#endif
+#define HAVE_SNPRINTF
+#define HAVE_VSNPRINTF
+#define HAVE_LOCKF
+#define HAVE_ENUM_BOOL
+#define HAVE_LINK_H
+#else
+#if OS_MINOR_VERSION == 10
+#if !defined __cplusplus
+#define _XOPEN_SOURCE 600
+#define __EXTENSIONS__
+#endif
+#define HAVE_SNPRINTF
+#define HAVE_VSNPRINTF
+#define HAVE_LOCKF
+#define HAVE_STDBOOL_H
+#define HAVE_STDINT_H
+#define HAVE_STRERROR_R
+#else
+ #error unknown platform
+#endif /* OS_MINOR_VERSION == 10 */
+#endif /* OS_MINOR_VERSION == 8 */
+#else
+ #error unknown platform
+#endif /* OS_MAJOR_VERSION == 5 */
+#endif /* defined SUNOS */
+
+#if defined CYGWIN
+#if OS_MAJOR_VERSION == 5
+#if OS_MINOR_VERSION == 0
+#define _XOPEN_SOURCE 600
+#define HAVE_ENUM_BOOL
+#else
+ #error unknown platform
+#endif /* OS_MINOR_VERSION == 0 */
+#else
+ #error unknown platform
+#endif /* OS_MAJOR_VERSION == 5 */
+#endif /* defined CYGWIN */
diff --git a/src/port/unused.h b/src/port/unused.h
new file mode 100644
index 0000000..c7692f6
--- /dev/null
+++ b/src/port/unused.h
@@ -0,0 +1,8 @@
+#ifndef __UNUSED_H
+#define __UNUSED_H
+
+#include "port/sys.h"
+
+#define UNUSED( x ) if( 0 && (x) ) { }
+
+#endif /* ifndef __UNUSED_H */