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