home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / word2x0a.zip / source / portable.h < prev    next >
C/C++ Source or Header  |  1998-07-21  |  1KB  |  52 lines

  1. /* $Id: portable.h,v 1.2 1997/05/07 23:40:49 dps Exp $ */
  2.  
  3. #ifndef __word2x_compat_h__
  4. #define __word2x_compat_h__
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. #ifdef HAVE_CONFIG_H
  11. #include "config.h"
  12. #endif /* HAVE_CONFIG_H */
  13.  
  14. #ifdef __GNUC__
  15. #define alloca __builtin_alloca
  16. #else
  17. #if HAVE_ALLOCA_H
  18. #include <alloca.h>
  19. #else /* Do not have alloca.h */
  20. #ifdef _AIX
  21.  #pragma alloca
  22. #else /* not _AIX */
  23. char *alloca();
  24. #endif /* _AIX */
  25. #endif /* HAVE_ALLOCA_H */
  26. #endif /* __GNUC__ */
  27.  
  28.  
  29. #ifdef HAVE_STDLIB_H
  30. #include <stdlib.h>
  31. #endif /* HAVE_STDLIB_H */
  32. #ifdef HAVE_SYS_TYPES_H
  33. #include <sys/types.h>
  34. #endif /* HAVE_SYS_TYPES_H */
  35.  
  36. /* Make sure we have some string functions declared */
  37. #ifndef HAVE_DECL_strcasecmp
  38. extern int strcasecmp(const char *, const char *);
  39. #endif
  40. #ifndef HAVE_DECL_strncasecmp
  41. extern int strncasecmp(const char *, const char *, size_t);
  42. #endif
  43. #ifndef HAVE_DECL_strdup
  44. extern  char *strdup(const char *);
  45. #endif
  46.  
  47. #ifdef __cplusplus
  48. }
  49. #endif /* __cplusplus */
  50.  
  51. #endif /* __word2x_compat_h__ */
  52.