summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_config_common.h
diff options
context:
space:
mode:
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 */