summaryrefslogtreecommitdiff
path: root/src/port/sys_internal.h
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2010-02-13 09:56:58 +0100
committerAndreas Baumann <abaumann@yahoo.com>2010-02-13 09:56:58 +0100
commit68354c7d41085d1f976a5b1d7ee542479a85f621 (patch)
treeaec761c793093e4a2e4ce18d78b3b531bcb12a42 /src/port/sys_internal.h
downloadsqlitexx-68354c7d41085d1f976a5b1d7ee542479a85f621.tar.gz
sqlitexx-68354c7d41085d1f976a5b1d7ee542479a85f621.tar.bz2
imported trunk from sourceforge SVN
Diffstat (limited to 'src/port/sys_internal.h')
-rw-r--r--src/port/sys_internal.h136
1 files changed, 136 insertions, 0 deletions
diff --git a/src/port/sys_internal.h b/src/port/sys_internal.h
new file mode 100644
index 0000000..5b6a0b2
--- /dev/null
+++ b/src/port/sys_internal.h
@@ -0,0 +1,136 @@
+/*
+ * sqlite3xx - sqlite3 C++ layer, following the ideas of libpqxx
+ * Copyright (C) 2009 Andreas Baumann
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions of
+ * the GNU Lesser General Public License, as published by the Free Software
+ * Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef SQLITE3XX_SYS_INTERNAL_H
+#define SQLITE3XX_SYS_INTERNAL_H
+
+#if defined LINUX
+#if OS_MAJOR_VERSION == 2
+#if OS_MINOR_VERSION == 6
+#define _XOPEN_SOURCE 600
+#define HAVE_STRDUP
+#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 && OS_MINOR_VERSION <= 2
+#define _XOPEN_SOURCE 600
+#define HAVE_STRDUP
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 2 */
+#else
+#if OS_MAJOR_VERSION == 6
+#if OS_MINOR_VERSION == 2
+#define _XOPEN_SOURCE 600
+#define HAVE_STRDUP
+#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 <= 5
+#define _XOPEN_SOURCE 600
+#define HAVE_STRDUP
+#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 NETBSD
+#if OS_MAJOR_VERSION == 5
+#if OS_MINOR_VERSION == 0
+/* don't enable XOPEN_SOURCE here, we get compatibility problems
+ * with libstdc++: vgwscanf undefined
+ */
+#define HAVE_STRDUP
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION == 2 */
+#else /* defined OS_MAJOR_VERSION == 4 */
+
+#if OS_MAJOR_VERSION == 4
+#if OS_MINOR_VERSION == 0
+#define _XOPEN_SOURCE 600
+#define HAVE_STRDUP
+#else
+ #error unknown platform
+#endif /* defined OS_MINOR_VERSION == 2 */
+#else
+ #error unknown platform
+#endif /* defined OS_MAJOR_VERSION == 4 */
+#endif /* defined OS_MAJOR_VERSION == 5 */
+#endif /* defined NETBSD */
+
+#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_STRDUP
+#else
+#if OS_MINOR_VERSION == 10
+#if !defined __cplusplus
+#define _XOPEN_SOURCE 600
+#define __EXTENSIONS__
+#endif
+#define HAVE_STRDUP
+#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 && OS_MINOR_VERSION <= 1
+#define _XOPEN_SOURCE 600
+#else
+ #error unknown platform
+#endif /* OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 1 */
+#else
+ #error unknown platform
+#endif /* OS_MAJOR_VERSION == 5 */
+#endif /* defined CYGWIN */
+
+#endif /* ifndef SQLITE3XX_SYS_INTERNAL_H */