You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1016 B

22 years ago
  1. #ifndef TSRM_CONFIG_COMMON_H
  2. #define TSRM_CONFIG_COMMON_H
  3. #if WINNT|WIN32
  4. # define TSRM_WIN32
  5. #endif
  6. #ifdef TSRM_WIN32
  7. # include "tsrm_config.w32.h"
  8. #else
  9. # include <tsrm_config.h>
  10. # include <sys/param.h>
  11. #endif
  12. #if HAVE_ALLOCA_H && !defined(_ALLOCA_H)
  13. # include <alloca.h>
  14. #endif
  15. /* AIX requires this to be the first thing in the file. */
  16. #ifndef __GNUC__
  17. # ifndef HAVE_ALLOCA_H
  18. # ifdef _AIX
  19. #pragma alloca
  20. # else
  21. # ifndef alloca /* predefined by HP cc +Olibcalls */
  22. # ifndef NETWARE
  23. char *alloca ();
  24. # endif
  25. # endif
  26. # endif
  27. # endif
  28. #endif
  29. #if HAVE_UNISTD_H
  30. #include <unistd.h>
  31. #endif
  32. #if HAVE_LIMITS_H
  33. #include <limits.h>
  34. #endif
  35. #ifndef MAXPATHLEN
  36. # ifdef PATH_MAX
  37. # define MAXPATHLEN PATH_MAX
  38. # else
  39. # define MAXPATHLEN 256
  40. # endif
  41. #endif
  42. #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
  43. # define tsrm_do_alloca(p) alloca(p)
  44. # define tsrm_free_alloca(p)
  45. #else
  46. # define tsrm_do_alloca(p) malloc(p)
  47. # define tsrm_free_alloca(p) free(p)
  48. #endif
  49. #endif /* TSRM_CONFIG_COMMON_H */