pbs_config.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /*
  2. * Copyright (C) 1994-2018 Altair Engineering, Inc.
  3. * For more information, contact Altair at www.altair.com.
  4. *
  5. * This file is part of the PBS Professional ("PBS Pro") software.
  6. *
  7. * Open Source License Information:
  8. *
  9. * PBS Pro is free software. You can redistribute it and/or modify it under the
  10. * terms of the GNU Affero General Public License as published by the Free
  11. * Software Foundation, either version 3 of the License, or (at your option) any
  12. * later version.
  13. *
  14. * PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  15. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16. * FOR A PARTICULAR PURPOSE.
  17. * See the GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. *
  22. * Commercial License Information:
  23. *
  24. * For a copy of the commercial license terms and conditions,
  25. * go to: (http://www.pbspro.com/UserArea/agreement.html)
  26. * or contact the Altair Legal Department.
  27. *
  28. * Altair’s dual-license business model allows companies, individuals, and
  29. * organizations to create proprietary derivative works of PBS Pro and
  30. * distribute them - whether embedded or bundled with other software -
  31. * under a commercial license agreement.
  32. *
  33. * Use of Altair’s trademarks, including but not limited to "PBS™",
  34. * "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  35. * trademark licensing policies.
  36. *
  37. */
  38. #ifndef _PBS_CONFIG_H
  39. #define _PBS_CONFIG_H 1
  40. /**
  41. * Scalability:
  42. * To address more than 10K connections, increase FD_SETSIZE
  43. * limit for select() to 16384, before including "winsock2.h".
  44. */
  45. #ifdef FD_SETSIZE
  46. #undef FD_SETSIZE
  47. #endif
  48. #define FD_SETSIZE 16384
  49. #ifdef _WIN32_WINNT
  50. #undef _WIN32_WINNT
  51. #endif
  52. /*
  53. * The header file Ws2tcpip.h contains various sections that are version
  54. * dependent. It uses the macro NTDDI_VERSION which is set based on the
  55. * value of _WIN32_WINNT. As older versions of Windows become obsolete,
  56. * this variable should be updated accordingly.
  57. *
  58. * 0x0400 = Windows NT 4.0
  59. * 0x0500 = Windows 2000
  60. * 0x0501 = Windows XP (EOL April 8, 2014)
  61. * 0x0502 = Windows Server 2003 (EOL July 14, 2015)
  62. * 0x0600 = Windows Vista and Windows Server 2008
  63. * 0x0601 = Windows 7
  64. * 0x0602 = Windows 8
  65. * 0x0603 = Windows 8.1
  66. * 0x0A00 = Windows 10
  67. */
  68. #define _WIN32_WINNT 0x0600 /* so we get extensions like winsock2.h */
  69. #include <winsock2.h>
  70. #include <Ws2tcpip.h> /* added for getaddrinfo and getnameinfo */
  71. #include <windows.h>
  72. #include <windowsx.h>
  73. #include <winbase.h>
  74. #include <io.h>
  75. #include <sys/locking.h>
  76. #include <direct.h>
  77. #include <lmcons.h>
  78. #include <process.h>
  79. #include <time.h>
  80. #include <sys/utime.h>
  81. #include <win.h> /* should be last in case we need to replace */
  82. /* previous declarations */
  83. typedef unsigned long u_long;
  84. typedef unsigned int u_int;
  85. typedef unsigned short u_short;
  86. typedef unsigned char u_char;
  87. typedef int pbs_socklen_t;
  88. typedef int ssize_t;
  89. #if 0
  90. typedef int uid_t;
  91. typedef int gid_t;
  92. typedef int pid_t;
  93. #endif
  94. /*
  95. ** Config stuff.
  96. */
  97. /* PBS specific: Define to the path of the global configuration file */
  98. #define PBS_CONF_FILE "C:\\Program Files\\PBS Pro\\pbs.conf"
  99. #define NGROUPS_MAX 10
  100. /* PBS specific: Define if PBS should use RPP/UDP for resource queries */
  101. #define RPP 1
  102. /* The number of bytes in a double. */
  103. #define SIZEOF_DOUBLE 8
  104. /* The number of bytes in a float. */
  105. #define SIZEOF_FLOAT 4
  106. /* The number of bytes in a int. */
  107. #define SIZEOF_INT 4
  108. /* The number of bytes in a long. */
  109. #define SIZEOF_LONG 4
  110. /* The number of bytes in a long double. */
  111. #define SIZEOF_LONG_DOUBLE 12
  112. /* The number of bytes in a short. */
  113. #define SIZEOF_SHORT 2
  114. /* The number of bytes in a signed char. */
  115. #define SIZEOF_SIGNED_CHAR 1
  116. /* The number of bytes in a unsigned. */
  117. #define SIZEOF_UNSIGNED 4
  118. /* The number of bytes in a unsigned char. */
  119. #define SIZEOF_UNSIGNED_CHAR 1
  120. /* The number of bytes in a unsigned int. */
  121. #define SIZEOF_UNSIGNED_INT 4
  122. /* The number of bytes in a unsigned long. */
  123. #define SIZEOF_UNSIGNED_LONG 4
  124. /* The number of bytes in a unsigned short. */
  125. #define SIZEOF_UNSIGNED_SHORT 2
  126. /* PBS specific: the seperator for Tcl attribute parsing */
  127. #define TCL_ATRSEP "."
  128. /* PBS specific: The pathname of the temporary directory for mom */
  129. #define TMP_DIR "C:\\WINNT\\TEMP"
  130. /* Let's define PBS_PASS_CREDENTIALS but make sure openssl AES include and lib */
  131. /* files are available in \Program Files\Openssl\{include,lib } */
  132. #define PBS_PASS_CREDENTIALS
  133. #define HAVE_ATEXIT 1
  134. #define H_ERRNO_DECLARED 1
  135. #define TCL_QSTAT 1
  136. /* PBS specific: Define to the path of the qstat init file */
  137. #define QSTATRC_PATH "C:\\Program Files\\PBS Pro\\qstatrc"
  138. /* Use Python */
  139. #define PYTHON 1
  140. #define Py_NO_ENABLE_SHARED 1
  141. /* Default PBS postgres port and user */
  142. #define PBS_DATA_SERVICE_PORT 15007
  143. #define PBS_DATA_SERVICE_USER "pbsdata"
  144. /* on Windows use SELECT calls for tpp */
  145. #define HAVE_SELECT
  146. /* Define QMGR_HAVE_HIST for windows */
  147. #define QMGR_HAVE_HIST 1
  148. /* Define that we have read-write pthread locks */
  149. #define RWLOCK_SUPPORT 1
  150. #endif /* _PBS_CONFIG_H */