config.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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 HAS_NO_GRP_PWD_H
  33. #define HAS_NO_TERMIOS_H
  34. #define HAS_NO_SYS_PARAM_H
  35. #define HAS_NO_SYS_IOCTL_H
  36. #define USE_O_TEXT
  37. #define HAS_ACS_AS_PCCHARS
  38. #define HAS_DIRECT_COLOR_ACCESS
  39. #define NEEDS_CR_LF_TRANSLATION
  40. #ifdef MC_NT
  41. # ifndef WIN32
  42. # define WIN32
  43. # endif
  44. # ifndef __WIN32__
  45. # define __WIN32__
  46. # endif
  47. # ifndef MSWINDOWS
  48. # define MSWINDOWS
  49. # endif
  50. # ifndef _OS_NT
  51. # define _OS_NT
  52. # endif
  53. #endif /* MC_NT */
  54. #ifdef MC_OS2
  55. # ifndef OS2
  56. # define OS2
  57. # endif
  58. # ifndef __os2__
  59. # define __os2__
  60. # define NEEDS_LOCAL_DIRENT_H
  61. # endif
  62. #endif /* MC_OS2 */
  63. #include "..\VERSION"
  64. #ifndef pc_system
  65. # define pc_system
  66. #endif
  67. #ifndef HAVE_SLANG
  68. # define HAVE_SLANG
  69. #endif
  70. #ifndef _CONSOLE
  71. # define _CONSOLE
  72. #endif
  73. #define FLOAT_TYPE
  74. #define MIDNIGHT
  75. #define USE_INTERNAL_EDIT
  76. #define STDC_HEADERS
  77. #define HAVE_STDLIB_H
  78. #define HAVE_STRING_H
  79. #define HAVE_DIRENT_H
  80. #define HAVE_LIMITS_H
  81. #define HAVE_UTIME_H
  82. #define HAVE_MEMSET
  83. #define HAVE_MEMCHR
  84. #define HAVE_MEMCPY
  85. #define HAVE_MEMCMP
  86. #define HAVE_MEMMOVE
  87. #define HAVE_STRDUP
  88. #define HAVE_STRERROR
  89. #define HAVE_TRUNCATE
  90. #define REGEX_MALLOC
  91. #define NO_INFOMOUNT
  92. typedef unsigned int umode_t;
  93. #define S_IFLNK 0
  94. #define S_ISLNK(x) 0
  95. #ifdef __EMX__
  96. #define S_IFBLK 0
  97. #define S_ISBLK(x) 0
  98. #endif /* __EMX__ */
  99. #ifdef __MINGW32__
  100. #define S_IRGRP 0000040
  101. #define S_IWGRP 0000020
  102. #define S_IXGRP 0000010
  103. #define S_IROTH 0000004
  104. #define S_IWOTH 0000002
  105. #define S_IXOTH 0000001
  106. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  107. typedef int mode_t;
  108. typedef unsigned int nlink_t;
  109. typedef int gid_t;
  110. typedef int uid_t;
  111. typedef int pid_t;
  112. #endif /* __MINGW32__ */
  113. #ifdef _MSC_VER
  114. #pragma include_alias(<utime.h>, <sys/utime.h>)
  115. #define INLINE
  116. #define inline
  117. #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
  118. #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  119. #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  120. #define S_ISFIFO(m) 0
  121. #define S_ISBLK(x) 0
  122. #define S_IRWXU 0000700
  123. #define S_IRUSR 0000400
  124. #define S_IWUSR 0000200
  125. #define S_IXUSR 0000100
  126. #define S_IRWXG 0000070
  127. #define S_IRGRP 0000040
  128. #define S_IWGRP 0000020
  129. #define S_IXGRP 0000010
  130. #define S_IRWXO 0000007
  131. #define S_IROTH 0000004
  132. #define S_IWOTH 0000002
  133. #define S_IXOTH 0000001
  134. /* FIXME: is this definition correct? */
  135. #define R_OK 4
  136. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  137. #define popen _popen
  138. #define pclose _pclose
  139. typedef int mode_t;
  140. typedef unsigned int nlink_t;
  141. typedef int gid_t;
  142. typedef int uid_t;
  143. typedef int pid_t;
  144. #endif /* _MSC_VER */
  145. #ifdef __BORLANDC__
  146. #define INLINE
  147. #define inline
  148. #define S_IRWXG 0000070
  149. #define S_IRGRP 0000040
  150. #define S_IWGRP 0000020
  151. #define S_IXGRP 0000010
  152. #define S_IRWXO 0000007
  153. #define S_IROTH 0000004
  154. #define S_IWOTH 0000002
  155. #define S_IXOTH 0000001
  156. /* FIXME: is this definition correct? */
  157. #define R_OK 4
  158. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  159. #define popen _popen
  160. #define pclose _pclose
  161. #define sleep _sleep
  162. typedef int pid_t;
  163. #endif /* __BORLANDC__ */
  164. #ifdef __IBMC__
  165. #define INLINE
  166. #define inline
  167. #define S_ISFIFO(m) 0
  168. #define S_ISBLK(x) 0
  169. #define S_ISCHR(m) (((m) & S_IFCHR) != 0)
  170. #define S_ISDIR(m) (((m) & S_IFDIR) != 0)
  171. #define S_ISREG(m) (((m) & S_IFREG) != 0)
  172. #define S_IRWXU 0000700
  173. #define S_IRUSR 0000400
  174. #define S_IWUSR 0000200
  175. #define S_IXUSR 0000100
  176. #define S_IRWXG 0000070
  177. #define S_IRGRP 0000040
  178. #define S_IWGRP 0000020
  179. #define S_IXGRP 0000010
  180. #define S_IRWXO 0000007
  181. #define S_IROTH 0000004
  182. #define S_IWOTH 0000002
  183. #define S_IXOTH 0000001
  184. #define ENOTDIR ENOENT
  185. /* FIXME: is this definition correct? */
  186. #define R_OK 4
  187. #pragma map( chdir , "_chdir" )
  188. #pragma map( getcwd, "_getcwd" )
  189. #pragma map( mkdir , "_mkdir" )
  190. #pragma map( rmdir , "_rmdir" )
  191. #define popen DosCreatePipe
  192. #define pclose DosClose
  193. #define sleep DosSleep
  194. typedef unsigned int nlink_t;
  195. typedef int mode_t;
  196. typedef int gid_t;
  197. typedef int uid_t;
  198. typedef int pid_t;
  199. #endif /* __IBMC__ */
  200. #endif /* __CONFIG_H */