2
0

EUSCompat.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. #include <sys/types.h>
  52. #if defined(CSRG_BASED) || defined(__linux__)
  53. # include <sys/socket.h>
  54. #endif
  55. #if defined(sun) && defined(_XOPEN_SOURCE)
  56. #ifndef B_TRUE
  57. #define B_TRUE _B_TRUE
  58. #endif
  59. #ifndef B_FALSE
  60. #define B_FALSE _B_FALSE
  61. #endif
  62. #endif /* sun && _XOPEN_SOURCE */
  63. #if defined(__linux__) || defined(CSRG_BASED)
  64. #include <string.h> /* memset for libcsa and others */
  65. typedef enum {B_FALSE, B_TRUE} boolean_t;
  66. #define MAXNAMELEN 256
  67. #endif
  68. /*
  69. ** AIX defines
  70. */
  71. #if defined(AIX)
  72. #ifndef KERNEL
  73. #define KERNEL
  74. #endif
  75. #ifndef _BSD_INCLUDES
  76. #define _BSD_INCLUDES
  77. #endif
  78. #include <sys/types.h>
  79. #define _SC_PAGESIZE _SC_PAGE_SIZE
  80. #ifndef MAXPATHLEN
  81. #include <sys/param.h>
  82. #endif
  83. #define MAXNAMELEN 256
  84. #ifndef _POWER
  85. typedef enum {B_FALSE, B_TRUE} boolean_t;
  86. #else /* _POWER */
  87. #ifndef B_FALSE
  88. #define B_FALSE 0
  89. #endif
  90. #ifndef B_TRUE
  91. #define B_TRUE 1
  92. #endif
  93. #endif /* _POWER */
  94. #undef BIG_ENDIAN
  95. #endif /* AIX */
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif