EUSCompat.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /*
  24. *+SNOTICE
  25. *
  26. * $TOG: EUSCompat.h /main/4 1998/04/03 17:11:57 mgreess $
  27. *
  28. * RESTRICTED CONFIDENTIAL INFORMATION:
  29. *
  30. * The information in this document is subject to special
  31. * restrictions in a confidential disclosure agreement bertween
  32. * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
  33. * document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
  34. * Sun's specific written approval. This documment and all copies
  35. * and derivative works thereof must be returned or destroyed at
  36. * Sun's request.
  37. *
  38. * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
  39. *
  40. *+ENOTICE
  41. */
  42. #ifndef _EUSCOMPAT_H
  43. #define _EUSCOMPAT_H
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. /*
  48. ** System V R4 based systems define the stuff we need in
  49. ** sys/types.h. Include that and then we are done.
  50. */
  51. #if defined(HPUX) || defined(__linux__) || defined(SunOS)
  52. #include <sys/types.h>
  53. #endif
  54. #if defined(sun) && defined(_XOPEN_SOURCE)
  55. #ifndef B_TRUE
  56. #define B_TRUE _B_TRUE
  57. #endif
  58. #ifndef B_FALSE
  59. #define B_FALSE _B_FALSE
  60. #endif
  61. #endif /* sun && _XOPEN_SOURCE */
  62. /*
  63. ** HPUX defines most of what we need, if we set the right
  64. ** include options before including the system files.
  65. */
  66. #if defined(HPUX)
  67. #ifndef _INCLUDE_POSIX_SOURCE
  68. #define _INCLUDE_POSIX_SOURCE
  69. #endif
  70. #ifndef _INCLUDE_XOPEN_SOURCE
  71. #define _INCLUDE_XOPEN_SOURCE
  72. #endif
  73. #ifndef _INCLUDE_AES_SOURCE
  74. #define _INCLUDE_AES_SOURCE
  75. #endif
  76. #ifndef _INCLUDE_HPUX_SOURCE
  77. #define _INCLUDE_HPUX_SOURCE
  78. #endif
  79. #ifndef hpV4
  80. typedef unsigned long ulong_t;
  81. #endif /* hpV4 */
  82. typedef unsigned char uchar_t;
  83. typedef enum {B_FALSE, B_TRUE} boolean_t;
  84. #define _SC_PAGESIZE _SC_PAGE_SIZE
  85. #ifndef MAXPATHLEN
  86. #include <sys/param.h>
  87. #endif
  88. #define MAXNAMELEN 256
  89. #endif /* HPUX */
  90. #if defined(__linux__) || defined(CSRG_BASED)
  91. typedef enum {B_FALSE, B_TRUE} boolean_t;
  92. #define MAXNAMELEN 256
  93. #endif
  94. /*
  95. ** AIX, like HPUX defines most of what we need.
  96. */
  97. #if defined(AIX)
  98. #ifndef KERNEL
  99. #define KERNEL
  100. #endif
  101. #ifndef _BSD_INCLUDES
  102. #define _BSD_INCLUDES
  103. #endif
  104. #include <sys/types.h>
  105. #define _SC_PAGESIZE _SC_PAGE_SIZE
  106. #define vfork fork
  107. #ifndef MAXPATHLEN
  108. #include <sys/param.h>
  109. #endif
  110. #define MAXNAMELEN 256
  111. #ifndef _POWER
  112. typedef enum {B_FALSE, B_TRUE} boolean_t;
  113. #else /* _POWER */
  114. #ifndef B_FALSE
  115. #define B_FALSE 0
  116. #endif
  117. #ifndef B_TRUE
  118. #define B_TRUE 1
  119. #endif
  120. #endif /* _POWER */
  121. #undef BIG_ENDIAN
  122. #endif /* AIX */
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif