config.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /****************************************************************************
  2. CONFIG.H - Midnight Commander Configuration for Win32
  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 NATIVE_WIN32
  29. #define NEEDS_IO_H
  30. #define NEEDS_DRIVE_H
  31. #define NEEDS_FCNTL_H
  32. #define HAS_ACS_AS_PCCHARS
  33. #ifdef MC_NT
  34. # ifndef WIN32
  35. # define WIN32
  36. # endif
  37. # ifndef __WIN32__
  38. # define __WIN32__
  39. # endif
  40. # ifndef MSWINDOWS
  41. # define MSWINDOWS
  42. # endif
  43. # ifndef NATIVE_WIN32
  44. # define NATIVE_WIN32
  45. # endif
  46. #endif /* MC_NT */
  47. #include "VERSION"
  48. #ifndef pc_system
  49. # define pc_system
  50. #endif
  51. #ifndef HAVE_SLANG
  52. # define HAVE_SLANG
  53. #endif
  54. #ifndef _CONSOLE
  55. # define _CONSOLE
  56. #endif
  57. #define FLOAT_TYPE
  58. #define MIDNIGHT
  59. #define USE_INTERNAL_EDIT
  60. #define STDC_HEADERS
  61. #define HAVE_STDLIB_H
  62. #define HAVE_STRING_H
  63. #define HAVE_LIMITS_H
  64. #if defined (__MINGW32__) || defined (_MSC_VER)
  65. #define HAVE_SYS_UTIME_H
  66. #else
  67. #define HAVE_UTIME_H
  68. #endif
  69. #define HAVE_MEMSET
  70. #define HAVE_MEMCHR
  71. #define HAVE_MEMCPY
  72. #define HAVE_MEMCMP
  73. #define HAVE_MEMMOVE
  74. #define HAVE_STRDUP
  75. #define HAVE_STRERROR
  76. #define HAVE_TRUNCATE
  77. #define REGEX_MALLOC
  78. #define NO_INFOMOUNT
  79. typedef unsigned int umode_t;
  80. #ifdef __MINGW32__
  81. #define S_IRGRP 0000040
  82. #define S_IWGRP 0000020
  83. #define S_IXGRP 0000010
  84. #define S_IROTH 0000004
  85. #define S_IWOTH 0000002
  86. #define S_IXOTH 0000001
  87. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  88. typedef int mode_t;
  89. typedef unsigned int nlink_t;
  90. typedef int gid_t;
  91. typedef int uid_t;
  92. typedef int pid_t;
  93. #endif /* __MINGW32__ */
  94. #ifdef _MSC_VER
  95. #define INLINE
  96. #define inline
  97. #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  98. #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  99. #define S_IRWXU 0000700
  100. #define S_IRUSR 0000400
  101. #define S_IWUSR 0000200
  102. #define S_IXUSR 0000100
  103. #define S_IRWXG 0000070
  104. #define S_IRGRP 0000040
  105. #define S_IWGRP 0000020
  106. #define S_IXGRP 0000010
  107. #define S_IRWXO 0000007
  108. #define S_IROTH 0000004
  109. #define S_IWOTH 0000002
  110. #define S_IXOTH 0000001
  111. /* FIXME: is this definition correct? */
  112. #define R_OK 4
  113. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  114. #define popen _popen
  115. #define pclose _pclose
  116. typedef int mode_t;
  117. typedef unsigned int nlink_t;
  118. typedef int gid_t;
  119. typedef int uid_t;
  120. typedef int pid_t;
  121. #endif /* _MSC_VER */
  122. #ifdef __BORLANDC__
  123. #define INLINE
  124. #define inline
  125. #define S_IRWXG 0000070
  126. #define S_IRGRP 0000040
  127. #define S_IWGRP 0000020
  128. #define S_IXGRP 0000010
  129. #define S_IRWXO 0000007
  130. #define S_IROTH 0000004
  131. #define S_IWOTH 0000002
  132. #define S_IXOTH 0000001
  133. /* FIXME: is this definition correct? */
  134. #define R_OK 4
  135. #define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
  136. #define popen _popen
  137. #define pclose _pclose
  138. #define sleep _sleep
  139. typedef int pid_t;
  140. #endif /* __BORLANDC__ */
  141. #ifdef __IBMC__
  142. #define INLINE
  143. #define inline
  144. #define S_ISDIR(m) (((m) & S_IFDIR) != 0)
  145. #define S_ISREG(m) (((m) & S_IFREG) != 0)
  146. #define S_IRWXU 0000700
  147. #define S_IRUSR 0000400
  148. #define S_IWUSR 0000200
  149. #define S_IXUSR 0000100
  150. #define S_IRWXG 0000070
  151. #define S_IRGRP 0000040
  152. #define S_IWGRP 0000020
  153. #define S_IXGRP 0000010
  154. #define S_IRWXO 0000007
  155. #define S_IROTH 0000004
  156. #define S_IWOTH 0000002
  157. #define S_IXOTH 0000001
  158. #define ENOTDIR ENOENT
  159. /* FIXME: is this definition correct? */
  160. #define R_OK 4
  161. #pragma map( chdir , "_chdir" )
  162. #pragma map( getcwd, "_getcwd" )
  163. #pragma map( mkdir , "_mkdir" )
  164. #pragma map( rmdir , "_rmdir" )
  165. #define popen DosCreatePipe
  166. #define pclose DosClose
  167. #define sleep DosSleep
  168. typedef unsigned int nlink_t;
  169. typedef int mode_t;
  170. typedef int gid_t;
  171. typedef int uid_t;
  172. typedef int pid_t;
  173. #endif /* __IBMC__ */
  174. #endif /* __CONFIG_H */