config.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. /****************************************************************************
  2. CONFIG.H - Midnight Commander Configuration for Win32 and OS/2
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. ----------------------------------------------------------------------------
  15. Changes:
  16. - Created 951204/jfg
  17. - Changed from Alexander Dong (ado) for OS/2
  18. - Changed 980329 by Pavel Roskin for both OS/2 and NT
  19. ----------------------------------------------------------------------------
  20. Contents:
  21. - Headers flags
  22. - Library flags
  23. - Typedefs
  24. - etc.
  25. ****************************************************************************/
  26. #ifndef __CONFIG_H
  27. #define __CONFIG_H
  28. #define OS2_NT
  29. #define NEEDS_IO_H
  30. #define NEEDS_DRIVE_H
  31. #define NEEDS_FCNTL_H
  32. #define USE_O_TEXT
  33. #define HAS_ACS_AS_PCCHARS
  34. #define NEEDS_CR_LF_TRANSLATION
  35. #ifdef MC_NT
  36. # ifndef WIN32
  37. # define WIN32
  38. # endif
  39. # ifndef __WIN32__
  40. # define __WIN32__
  41. # endif
  42. # ifndef MSWINDOWS
  43. # define MSWINDOWS
  44. # endif
  45. # ifndef _OS_NT
  46. # define _OS_NT
  47. # endif
  48. #endif /* MC_NT */
  49. #include "VERSION"
  50. #ifndef pc_system
  51. # define pc_system
  52. #endif
  53. #ifndef HAVE_SLANG
  54. # define HAVE_SLANG
  55. #endif
  56. #ifndef _CONSOLE
  57. # define _CONSOLE
  58. #endif
  59. #define FLOAT_TYPE
  60. #define MIDNIGHT
  61. #define USE_INTERNAL_EDIT
  62. #define STDC_HEADERS
  63. #define HAVE_STDLIB_H
  64. #define HAVE_STRING_H
  65. #define HAVE_LIMITS_H
  66. #if defined (__MINGW32__) || defined (_MSC_VER)
  67. #define HAVE_SYS_UTIME_H
  68. #else
  69. #define HAVE_UTIME_H
  70. #endif
  71. #define HAVE_MEMSET
  72. #define HAVE_MEMCHR
  73. #define HAVE_MEMCPY
  74. #define HAVE_MEMCMP
  75. #define HAVE_MEMMOVE
  76. #define HAVE_STRDUP
  77. #define HAVE_STRERROR
  78. #define HAVE_TRUNCATE
  79. #define REGEX_MALLOC
  80. #define NO_INFOMOUNT
  81. typedef unsigned int umode_t;
  82. #ifdef __MINGW32__
  83. #define S_IRGRP 0000040
  84. #define S_IWGRP 0000020
  85. #define S_IXGRP 0000010
  86. #define S_IROTH 0000004
  87. #define S_IWOTH 0000002
  88. #define S_IXOTH 0000001
  89. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  90. typedef int mode_t;
  91. typedef unsigned int nlink_t;
  92. typedef int gid_t;
  93. typedef int uid_t;
  94. typedef int pid_t;
  95. #endif /* __MINGW32__ */
  96. #ifdef _MSC_VER
  97. #define INLINE
  98. #define inline
  99. #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  100. #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  101. #define S_IRWXU 0000700
  102. #define S_IRUSR 0000400
  103. #define S_IWUSR 0000200
  104. #define S_IXUSR 0000100
  105. #define S_IRWXG 0000070
  106. #define S_IRGRP 0000040
  107. #define S_IWGRP 0000020
  108. #define S_IXGRP 0000010
  109. #define S_IRWXO 0000007
  110. #define S_IROTH 0000004
  111. #define S_IWOTH 0000002
  112. #define S_IXOTH 0000001
  113. /* FIXME: is this definition correct? */
  114. #define R_OK 4
  115. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  116. #define popen _popen
  117. #define pclose _pclose
  118. typedef int mode_t;
  119. typedef unsigned int nlink_t;
  120. typedef int gid_t;
  121. typedef int uid_t;
  122. typedef int pid_t;
  123. #endif /* _MSC_VER */
  124. #ifdef __BORLANDC__
  125. #define INLINE
  126. #define inline
  127. #define S_IRWXG 0000070
  128. #define S_IRGRP 0000040
  129. #define S_IWGRP 0000020
  130. #define S_IXGRP 0000010
  131. #define S_IRWXO 0000007
  132. #define S_IROTH 0000004
  133. #define S_IWOTH 0000002
  134. #define S_IXOTH 0000001
  135. /* FIXME: is this definition correct? */
  136. #define R_OK 4
  137. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  138. #define popen _popen
  139. #define pclose _pclose
  140. #define sleep _sleep
  141. typedef int pid_t;
  142. #endif /* __BORLANDC__ */
  143. #ifdef __IBMC__
  144. #define INLINE
  145. #define inline
  146. #define S_ISDIR(m) (((m) & S_IFDIR) != 0)
  147. #define S_ISREG(m) (((m) & S_IFREG) != 0)
  148. #define S_IRWXU 0000700
  149. #define S_IRUSR 0000400
  150. #define S_IWUSR 0000200
  151. #define S_IXUSR 0000100
  152. #define S_IRWXG 0000070
  153. #define S_IRGRP 0000040
  154. #define S_IWGRP 0000020
  155. #define S_IXGRP 0000010
  156. #define S_IRWXO 0000007
  157. #define S_IROTH 0000004
  158. #define S_IWOTH 0000002
  159. #define S_IXOTH 0000001
  160. #define ENOTDIR ENOENT
  161. /* FIXME: is this definition correct? */
  162. #define R_OK 4
  163. #pragma map( chdir , "_chdir" )
  164. #pragma map( getcwd, "_getcwd" )
  165. #pragma map( mkdir , "_mkdir" )
  166. #pragma map( rmdir , "_rmdir" )
  167. #define popen DosCreatePipe
  168. #define pclose DosClose
  169. #define sleep DosSleep
  170. typedef unsigned int nlink_t;
  171. typedef int mode_t;
  172. typedef int gid_t;
  173. typedef int uid_t;
  174. typedef int pid_t;
  175. #endif /* __IBMC__ */
  176. #endif /* __CONFIG_H */