2000-09-07 04:27:12 +08:00
|
|
|
#ifndef TSRM_CONFIG_COMMON_H
|
|
|
|
#define TSRM_CONFIG_COMMON_H
|
|
|
|
|
2007-02-16 03:11:48 +08:00
|
|
|
#ifndef __CYGWIN__
|
|
|
|
# if WINNT|WIN32
|
|
|
|
# define TSRM_WIN32
|
|
|
|
# endif
|
2000-09-07 04:27:12 +08:00
|
|
|
#endif
|
|
|
|
|
2002-05-29 16:41:21 +08:00
|
|
|
#ifdef TSRM_WIN32
|
|
|
|
# include "tsrm_config.w32.h"
|
|
|
|
#else
|
2005-03-17 16:15:23 +08:00
|
|
|
# include <tsrm_config.h>
|
2000-09-07 23:31:29 +08:00
|
|
|
# include <sys/param.h>
|
2000-09-07 04:27:12 +08:00
|
|
|
#endif
|
|
|
|
|
2002-11-12 00:32:36 +08:00
|
|
|
#if HAVE_ALLOCA_H && !defined(_ALLOCA_H)
|
|
|
|
# include <alloca.h>
|
|
|
|
#endif
|
|
|
|
|
2001-12-10 07:43:20 +08:00
|
|
|
/* AIX requires this to be the first thing in the file. */
|
|
|
|
#ifndef __GNUC__
|
2002-11-12 00:32:36 +08:00
|
|
|
# ifndef HAVE_ALLOCA_H
|
2001-12-10 07:43:20 +08:00
|
|
|
# ifdef _AIX
|
2003-08-26 07:24:29 +08:00
|
|
|
#pragma alloca
|
2001-12-10 07:43:20 +08:00
|
|
|
# else
|
|
|
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
2003-06-25 13:05:06 +08:00
|
|
|
# ifndef NETWARE
|
2001-12-10 07:43:20 +08:00
|
|
|
char *alloca ();
|
2003-06-25 13:05:06 +08:00
|
|
|
# endif
|
2001-12-10 07:43:20 +08:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# endif
|
2000-09-07 23:31:29 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_LIMITS_H
|
|
|
|
#include <limits.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAXPATHLEN
|
|
|
|
# ifdef PATH_MAX
|
|
|
|
# define MAXPATHLEN PATH_MAX
|
2005-12-20 22:24:14 +08:00
|
|
|
# elif defined(MAX_PATH)
|
|
|
|
# define MAXPATHLEN MAX_PATH
|
2000-09-07 23:31:29 +08:00
|
|
|
# else
|
|
|
|
# define MAXPATHLEN 256
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2000-09-07 04:27:12 +08:00
|
|
|
#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 */
|