summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_config_common.h
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-09-06 20:27:12 +0000
committerAndi Gutmans <andi@php.net>2000-09-06 20:27:12 +0000
commitb8a95da22ab157b85fb1cf6c55c1ce71da420248 (patch)
tree67dfcb88a43d1a16bb1c613711feb32ccd8438a2 /TSRM/tsrm_config_common.h
parent180c337885981c4cf1e6f6facf64d549fe6a932d (diff)
downloadphp-git-b8a95da22ab157b85fb1cf6c55c1ce71da420248.tar.gz
- Centralize some configuration stuff
- Use inline in my strtok_r implementation
Diffstat (limited to 'TSRM/tsrm_config_common.h')
-rw-r--r--TSRM/tsrm_config_common.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/TSRM/tsrm_config_common.h b/TSRM/tsrm_config_common.h
new file mode 100644
index 0000000000..1bec4d86f8
--- /dev/null
+++ b/TSRM/tsrm_config_common.h
@@ -0,0 +1,22 @@
+#ifndef TSRM_CONFIG_COMMON_H
+#define TSRM_CONFIG_COMMON_H
+
+#if WINNT|WIN32
+# define TSRM_WIN32
+#endif
+
+#ifndef TSRM_WIN32
+# include "tsrm_config.h"
+#else
+# include "tsrm_config.w32.h"
+#endif
+
+#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
+# define tsrm_do_alloca(p) alloca(p)
+# define tsrm_free_alloca(p)
+#else
+# define tsrm_do_alloca(p) malloc(p)
+# define tsrm_free_alloca(p) free(p)
+#endif
+
+#endif /* TSRM_CONFIG_COMMON_H */