home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ncftp-2.3.0-src.tgz / tar.out / contrib / ncftp / Cpp.c < prev    next >
C/C++ Source or Header  |  1996-09-28  |  5KB  |  275 lines

  1. /* Cpp.c */
  2.  
  3. #include "Sys.h"
  4. #include "Curses.h"
  5. #include "Util.h"
  6. #include "RCmd.h"
  7. #include "Cpp.h"
  8.  
  9. /* List of CPP symbols that we would like to have show up when we print
  10.  * ther version information.  Some of these are the program's, and others
  11.  * are OS defined symbols.
  12.  *
  13.  * If the compiler chokes in this part, it's probably because the symbol
  14.  * in question was the wrong type (was i when should be s, or vice versa).
  15.  * If you get into trouble, just change the entry for the symbol from
  16.  * using the "i" or "s" macro to use the "b" macro instead.
  17.  *
  18.  * Hopefully that won't happen, since most symbols use the "b" macro
  19.  * below, which doesn't try to use the value of the symbol.  The "i" and
  20.  * "s" macros do use the value, which is nice because then we'll be able
  21.  * to see the value of the symbol when we dump the symbol list.
  22.  */
  23.  
  24. #define i(a,b) { a, 0, (long) b, NULL },
  25. #define s(a,b) { a, 1, 0L, (char *)b },
  26. #define b(a,b) { a, 0, (long) 1, NULL },
  27.  
  28. CppSymbol gCppSymbols[] = {
  29. #ifdef __AIX
  30.     b("__AIX", __AIX)
  31. #else
  32. #    ifdef _AIX
  33.         b("_AIX", _AIX)
  34. #    else
  35. #        ifdef AIX
  36.             b("AIX", AIX)
  37. #        endif
  38. #    endif
  39. #endif
  40.  
  41. #ifdef apollo
  42.     b("apollo", apollo)
  43. #endif
  44. #ifdef aux
  45.     b("aux", aux)
  46. #endif
  47. #ifdef __Besta__
  48.     b("__Besta__", __Besta__)
  49. #endif
  50.  
  51. #ifdef __bsd__
  52.     b("__bsd__", __bsd__)
  53. #else
  54. #    ifdef __bsd
  55.         b("__bsd", __bsd)
  56. #    else
  57. #        ifdef __BSD
  58.             b("__BSD", __BSD)
  59. #        else
  60. #            ifdef _BSD
  61.                 b("_BSD", _BSD)
  62. #            else
  63. #                ifdef BSD
  64.                     b("BSD", BSD)
  65. #                else
  66. #                    ifdef _SYSTYPE_BSD
  67.                         b("_SYSTYPE_BSD", _SYSTYPE_BSD)
  68. #                    endif
  69. #                endif
  70. #            endif
  71. #        endif
  72. #    endif
  73. #endif
  74.  
  75. #ifdef __bsdi__
  76.     b("__bsdi__", __bsdi__)
  77. #endif
  78. #ifdef BULL
  79.     b("BULL", BULL)
  80. #endif
  81. #ifdef USE_CURSES
  82.     i("USE_CURSES", USE_CURSES)
  83. #endif
  84. #ifdef DEBUG
  85.     b("DEBUG", DEBUG)
  86. #endif
  87. #ifdef __dgux
  88.     b("__dgux", __dgux)
  89. #endif
  90. #ifdef DGUX
  91.     b("DGUX", DGUX)
  92. #endif
  93. #ifdef DOMAINNAME
  94.     s("DOMAINNAME", DOMAINNAME)
  95. #endif
  96. #ifdef DYNIX
  97.     b("DYNIX", DYNIX)
  98. #endif
  99. #ifdef DYNIXPTX
  100.     b("DYNIXPTX", DYNIXPTX)
  101. #endif
  102. #ifdef __FreeBSD__
  103.     b("__FreeBSD__", __FreeBSD__)
  104. #endif
  105. #ifdef FTP_PORT
  106.     i("FTP_PORT", FTP_PORT)
  107. #endif
  108. #ifdef __GNUC__
  109.     i("__GNUC__", __GNUC__)
  110. #endif
  111. #ifdef HAVE_LIBCURSES
  112.     b("HAVE_LIBCURSES", HAVE_LIBCURSES)
  113. #endif
  114. #ifdef HAVE_LIBNCURSES
  115.     b("HAVE_LIBNCURSES", HAVE_LIBNCURSES)
  116. #endif
  117. #ifdef HAVE_LIBTERMCAP
  118.     b("HAVE_LIBTERMCAP", HAVE_LIBTERMCAP)
  119. #endif
  120. #ifdef HAVE_LIBREADLINE
  121.     b("HAVE_LIBREADLINE", HAVE_LIBREADLINE)
  122. #endif
  123. #ifdef HAVE_LIBGETLINE
  124.     b("HAVE_LIBGETLINE", HAVE_LIBGETLINE)
  125. #endif
  126. #ifdef HAVE_LIBSOCKS
  127.     b("HAVE_LIBSOCKS", HAVE_LIBSOCKS)
  128. #endif
  129. #ifdef HAVE_UNISTD_H
  130.     b("HAVE_UNISTD_H", HAVE_UNISTD_H)
  131. #endif
  132. #ifdef HOSTNAME
  133.     s("HOSTNAME", HOSTNAME)
  134. #endif
  135.  
  136. #ifdef __hpux
  137.     b("__hpux", __hpux)
  138. #else
  139. #    ifdef HPUX
  140.         b("HPUX", HPUX)
  141. #    endif
  142. #endif
  143.  
  144. #ifdef IP_TOS
  145.     b("IP_TOS", IP_TOS)
  146. #endif
  147. #ifdef ISC
  148.     b("ISC", ISC)
  149. #endif
  150. #ifdef LIBMALLOC
  151.     b("LIBMALLOC", LIBMALLOC)
  152. #endif
  153.  
  154. #ifdef __linux__
  155.     b("__linux__", __linux__)
  156. #else
  157. #    ifdef linux
  158.         b("linux", linux)
  159. #    endif
  160. #endif
  161.  
  162. #ifdef LOCK_METHOD
  163.     i("LOCK_METHOD", LOCK_METHOD)
  164. #endif
  165. #ifdef NCURSES_VERSION
  166.     s("NCURSES_VERSION", NCURSES_VERSION)
  167. #endif
  168. #ifdef NO_FGTEST
  169.     b("NO_FGTEST", NO_FGTEST)
  170. #endif
  171. #ifdef NeXT
  172.     b("NeXT", NeXT)
  173. #endif
  174. #ifdef __osf__
  175.     b("__osf__", __osf__)
  176. #endif
  177. #ifdef _POSIX_VERSION
  178.     i("_POSIX_VERSION", _POSIX_VERSION)
  179. #endif
  180. #ifdef POSIX_SIGNALS
  181.     b("POSIX_SIGNALS", POSIX_SIGNALS)
  182. #endif
  183. #ifdef pyr
  184.     b("pyr", pyr)
  185. #endif
  186. #ifdef SCO322
  187.     b("SCO322", SCO322)
  188. #endif
  189. #ifdef SCO324
  190.     b("SCO324", SCO324)
  191. #endif
  192. #ifdef SETVBUF_REVERSED
  193.     b("SETVBUF_REVERSED", SETVBUF_REVERSED)
  194. #endif
  195. #ifdef __sgi
  196.     b("__sgi", __sgi)
  197. #endif
  198. #ifdef SINIX
  199.     b("SINIX", SINIX)
  200. #endif
  201. #ifdef __STDC__
  202.     i("__STDC__", __STDC__)
  203. #endif
  204.  
  205. #ifdef __sun
  206.     b("__sun", __sun)
  207. #else
  208. #    ifdef sun
  209.         b("sun", sun)
  210. #    endif
  211. #endif
  212.  
  213. #ifdef __svr3__
  214.     b("__svr3__", __svr3__)
  215. #else
  216. #    ifdef SVR3
  217.         b("SVR3", SVR3)
  218. #    endif
  219. #endif
  220.  
  221. #ifdef __svr4__
  222.     b("__svr4__", __svr4__)
  223. #else
  224. #    ifdef SVR4
  225.         b("SVR4", SVR4)
  226. #    endif
  227. #endif
  228.  
  229. #ifdef SYSLOG
  230.     b("SYSLOG", SYSLOG)
  231. #endif
  232.  
  233. #ifdef __sysv__
  234.     b("__sysv__", __sysv__)
  235. #else
  236. #    ifdef __sysv
  237.         b("__sysv", __sysv)
  238. #    else
  239. #        ifdef __SYSV
  240.             b("__SYSV", __SYSV)
  241. #        else
  242. #            ifdef _SYSV
  243.                 b("_SYSV", _SYSV)
  244. #            else
  245. #                ifdef SYSV
  246.                     b("SYSV", SYSV)
  247. #                else
  248. #                    ifdef _SYSTYPE_SYSV
  249.                         b("_SYSTYPE_SYSV", _SYSTYPE_SYSV)
  250. #                    endif
  251. #                endif
  252. #            endif
  253. #        endif
  254. #    endif
  255. #endif
  256.  
  257. #ifdef ultrix
  258.     b("ultrix", ultrix)
  259. #endif
  260. #ifdef UNAME
  261.     s("UNAME", UNAME)
  262. #endif
  263. #ifdef USE_GETPWUID
  264.     b("USE_GETPWUID", USE_GETPWUID)
  265. #endif
  266. #ifdef __386BSD__
  267.     b("__386BSD__", __386BSD__)
  268. #endif
  269.     { NULL, 0, 0 }
  270. };
  271.  
  272. int gNumCppSymbols = (int) (sizeof(gCppSymbols) / sizeof(CppSymbol)) - 1;
  273.  
  274. /* eof... */
  275.