home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / networking / tcpip / amitcp-support / ncftp-1.5.6 / src / rcs / sys.h,v < prev    next >
Encoding:
Text File  |  1994-06-29  |  9.7 KB  |  520 lines

  1. head    14020.14;
  2. access;
  3. symbols
  4.     ORIGINAL:14020.13;
  5. locks; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 14020.14
  10. date    93.10.10.20.03.06;    author alph;    state Exp;
  11. branches;
  12. next    14020.13;
  13.  
  14. 14020.13
  15. date    93.06.21.06.42.11;    author alph;    state Exp;
  16. branches;
  17. next    ;
  18.  
  19.  
  20. desc
  21. @Original version
  22. @
  23.  
  24.  
  25. 14020.14
  26. log
  27. @amigados changes
  28. @
  29. text
  30. @/* Sys.h
  31.  * See the README for details.
  32.  */
  33.  
  34. /*  $RCSfile: sys.h,v $
  35.  *  $Revision: 1.1 $
  36.  *  $Date: 1993/10/02 10:34:34 $
  37.  */
  38.  
  39. #ifdef amigados
  40. #    ifdef __SASC
  41. #        /* raw amiga port by Carsten Heyl, 10/93 */
  42. #        /* amiga sockets are not included within stdio */
  43. #        include <s_socket.h>
  44. #        define NO_FORK
  45. #        define NO_POPEN
  46. #        define NO_GETPWUID /* FIXME */
  47. #        define NO_PWSTUFF
  48. #        define NO_GETPID
  49. #        define NO_UTIME
  50. #        /* the compiler does not like defined(const) test */
  51. #        define HAS_CONST
  52. #        define HAS_SELECT_PROTO
  53. #        define USE_TMPNAM
  54. #        define USE_GETCWD
  55. #        define HAS_GETCWD_PROTO
  56. #        define NEED_TIME_T
  57. #        define HOME_DIR "s:"
  58. #        define TMP_NAME t:ncftpXXXXXX
  59. #        define System "AmigaOS"
  60.         void sleep(unsigned int ul);
  61. #        define h_errno errno
  62. #        define dLOGNAME "t:.ftplog"
  63. #        define dRECENTF "s:.nrecent"
  64. #    else
  65. #        error only SASC/AmiTCP supported 
  66. #    endif
  67. #endif
  68.  
  69. #ifdef SVR4
  70. #    define System "System V.4"
  71. #    ifndef SYSV
  72. #        define SYSV 1
  73. #    endif
  74. #    define VOID void
  75. #    ifndef HERROR
  76. #        define HERROR 1
  77. #    endif
  78. #    ifdef TERMH
  79. #        define TERMH 1
  80. #    endif
  81. #    define Gettimeofday gettimeofday
  82. #    include <sys/types.h>
  83. #endif  /* SVR4 */
  84.  
  85. #ifdef __sun
  86. #    ifndef sun
  87. #        define sun 1
  88. #    endif
  89. #endif
  90.  
  91. #ifdef sun
  92. #    if !defined(__GNUC__) && !defined(__STDC__) && !defined(SunOverride)
  93.     ^^^ "You need to use an ANSI C compiler.  Try using gcc or acc." ^^^
  94. #    endif
  95. #    define System "SunOS"
  96. #    ifndef RINDEX
  97. #        define RINDEX 1
  98. #    endif
  99. #    ifndef TERMIOS
  100. #        define TERMIOS 1
  101. #    endif
  102. #    ifndef HAS_DOMAINNAME
  103. #        define HAS_DOMAINNAME 1
  104. #    endif
  105. #endif /* sun */
  106.  
  107. #ifdef __sgi
  108. #    ifndef sgi
  109. #        define sgi 1
  110. #    endif
  111. #endif
  112.  
  113. #ifdef sgi
  114. #    define System "IRIX"
  115. #    ifndef SYSV
  116. #        define SYSV 1
  117. #    endif
  118. #    ifndef HERROR
  119. #        define HERROR 1
  120. #    endif
  121. #    ifndef U_WAIT
  122. #        define U_WAIT 1
  123. #    endif
  124. #    ifndef STRICT_PROTOS
  125. #        define STRICT_PROTOS 1
  126. #    endif
  127. #    ifndef TERMIOS
  128. #        define TERMIOS 1
  129. #    endif
  130. #endif /* sgi */
  131.  
  132. #ifdef _AIX
  133. #    define System "AIX"
  134. #    define SYSSELECTH 1
  135. #endif    /* _AIX */
  136.  
  137. #ifdef SCOXNX
  138. #    define System "SCO Xenix"
  139. #    define LAI_TCP
  140. #    define NO_UTIMEH
  141. #    define NO_MKTIME
  142. #    define NO_STRFTIME
  143. #    define NO_STRSTR
  144. #    define NO_RENAME
  145. #    define SYSV 1
  146. #endif    /* SCOXNX */
  147.  
  148. #ifdef SCO322
  149. #    define System "SCO Unix 3.2v2"
  150. #    define BOTCHED_FOPEN_RW
  151. #    define NO_RENAME    /* it exists, but it corrupts filesystems */
  152. #    define BROKEN_MEMCPY 1
  153. #    define SYSV 1
  154. #endif    /* SCO322 */
  155.  
  156. #ifdef SCO324
  157. #    define System "SCO Unix 3.2v4"
  158. #    ifndef SYSV
  159. #        define SYSV 1
  160. #    endif
  161. #    ifndef BROKEN_MEMCPY
  162. #        define BROKEN_MEMCPY 1
  163. #    endif
  164. #endif    /* SCO324 */
  165.  
  166. #ifdef aux
  167. #    define System "A/UX"
  168. #    ifndef BROKEN_MEMCPY
  169. #        define BROKEN_MEMCPY 1
  170. #    endif
  171. #    ifndef SYSV
  172. #        define SYSV 1
  173. #    endif
  174. #endif
  175.  
  176. #ifdef NeXT
  177. #    define System "NeXTStep"
  178. #    ifndef RINDEX
  179. #        define RINDEX 1
  180. #    endif
  181. #    ifndef BSD
  182. #        define BSD 1
  183. #    endif
  184. #    ifndef NO_UNISTDH
  185. #        define NO_UNISTDH 1
  186. #    endif
  187. #    ifndef NO_UTIMEH
  188. #        define NO_UTIMEH
  189. #    endif
  190. #endif
  191.  
  192. #ifdef pyr
  193. #    define System "OSx"
  194. #    ifndef BSD
  195. #        define BSD 1
  196. #    endif
  197. #    ifndef SGTTYB
  198. #        define SGTTYB 1
  199. #    endif
  200. #    ifndef NO_STDLIBH
  201. #        define NO_STDLIBH 1
  202. #    endif
  203. #    include <sys/types.h>
  204. extern int errno;
  205. #endif    /* pyr */
  206.  
  207. #ifdef DYNIX
  208. #    define System "Dynix"
  209. #    ifndef BSD
  210. #        define BSD 1
  211. #    endif
  212. #    ifndef SGTTYB
  213. #        define SGTTYB 1
  214. #    endif
  215. #    ifndef NO_UTIMEH
  216. #        define NO_UTIMEH 1
  217. #    endif
  218. #    ifndef NO_STDLIBH
  219. #        define NO_STDLIBH 1
  220. #    endif
  221. #    ifndef NO_VARARGS
  222. #        define NO_VARARGS 1
  223. #    endif
  224. #    include <sys/types.h>
  225. #endif    /* DYNIX */
  226.  
  227. #ifdef ultrix
  228. #    define System "Ultrix"
  229. #    ifndef BSD
  230. #        define BSD 1
  231. #    endif
  232. #    ifndef __GNUC__
  233. #        ifndef NO_CONST
  234. #            define NO_CONST 1
  235. #        endif
  236. #    endif
  237. #endif    /* ultrix */
  238.  
  239. #ifdef __hpux
  240. #    ifndef HPUX
  241. #        define HPUX 1
  242. #    endif
  243. #    define Select(a,b,c,d,e) select((a), (int *)(b), (c), (d), (e))
  244. #endif
  245.  
  246. #ifdef HPUX 
  247. #    define System "HP-UX"
  248. #    ifndef _HPUX_SOURCE
  249. #        define _HPUX_SOURCE 1
  250. #    endif
  251. #    ifndef GETCWDSIZET
  252. #        define GETCWDSIZET 1
  253. #    endif
  254. #    define SYSV 1
  255. #endif    /* HPUX */
  256.  
  257. #ifdef SINIX
  258. #    define System "SINIX"
  259. #    ifndef SYSV
  260. #        define SYSV 1
  261. #    endif
  262. /* You may need to add -lresolv, -lport, -lcurses to MORELIBS in Makefile. */
  263. #endif
  264.  
  265. #ifdef BULL          /* added 23nov92 for Bull DPX/2 */
  266. #    define _POSIX_SOURCE
  267. #    define _XOPEN_SOURCE
  268. #    define _BULL_SOURCE
  269. #    ifndef SYSV
  270. #        define SYSV 1
  271. #    endif
  272. #    define bull
  273. #    define System "Bull DPX/2 BOS"
  274. #    include <sys/types.h>
  275. #    define SYSSELECTH
  276. #endif  /* BULL */   /* added 23nov92 for Bull DPX/2 */
  277.  
  278. #ifdef __dgux
  279. #     ifndef DGUX
  280. #             define DGUX 1
  281. #     endif
  282. #endif
  283.  
  284. #ifdef DGUX
  285. #     ifndef _DGUX_SOURCE
  286. #             define _DGUX_SOURCE
  287. #     endif
  288. #     define GETCWDSIZET 1
  289. #     define BAD_INETADDR 1
  290. #     define SYSV 1
  291. #     define System "DG/UX"
  292. #endif  /* DGUX */
  293.  
  294. #ifdef apollo
  295. #    ifndef BSD
  296. #        define BSD 43
  297. #    endif
  298. #    define SIG_PARAMS (int sig, ...)
  299. #    define NO_UTIMEH 1
  300. #    define System "Apollo"
  301. #endif
  302.  
  303. /* -------------------------------------------------------------------- */
  304.  
  305. #ifdef _SYSV
  306. #    ifndef SYSV
  307. #        define SYSV 1
  308. #    endif
  309. #endif
  310.  
  311. #ifdef USG
  312. #    ifndef SYSV
  313. #        define SYSV 1
  314. #    endif
  315. #endif
  316.  
  317. #ifdef _BSD
  318. #    ifndef BSD
  319. #        define BSD 1
  320. #    endif
  321. #endif
  322.  
  323. #ifdef SYSV
  324. #    ifndef RINDEX
  325. #        define RINDEX 1
  326. #    endif
  327. #    define bcopy(s,d,l) memcpy((d),(s),(l))
  328. #ifdef __386BSD__
  329. #    define TERMIOS
  330. #    ifndef BSD
  331. #        define BSD
  332. #    endif
  333. #endif
  334.  
  335. #    define bzero(cp,l) memset((cp),0,(l))
  336. #endif
  337.  
  338. #ifdef BSD
  339. #    ifndef __386BSD__
  340. #        ifndef SYSDIRH
  341. #            define SYSDIRH 1
  342. #        endif
  343. #        ifndef SGTTYB
  344. #            define SGTTYB
  345. #        endif
  346. #    endif
  347. #    ifndef SGTTYB
  348. #        define SGTTYB
  349. #    endif
  350. #    ifndef RINDEX
  351. #        define RINDEX 1
  352. #    endif
  353. #endif
  354.  
  355. /*
  356.  * Generic pointer type, e.g. as returned by malloc().
  357.  */
  358. #ifndef PTRTYPE
  359. #    define PTRTYPE void
  360. #endif
  361.  
  362. #ifndef Free
  363. #    define Free(a) free((PTRTYPE *)(a))
  364. #endif
  365.  
  366. /*
  367.  * Some systems besides System V don't use rindex/index (like SunOS).
  368.  * Add -DRINDEX to your SDEFS line if you need to.
  369.  */
  370. #ifdef RINDEX
  371.     /* or #include <strings.h> if you have it. */
  372. #    define rindex strrchr
  373. #    define index strchr
  374. #endif /* RINDEX */
  375.  
  376. #ifdef SOCKS
  377. #define Getsockname(d,a,l) Rgetsockname((d), (struct sockaddr *)(a), (l))
  378. #else
  379. #ifdef SYSV
  380. #    define Getsockname(d,a,l) getsockname((d), (void *)(a), (l))
  381. #else
  382. #    define Getsockname(d,a,l) getsockname((d), (struct sockaddr *)(a), (l))
  383. #endif
  384. #endif
  385.  
  386. #ifndef Select
  387. #    define Select(a,b,c,d,e) select((a), (b), (c), (d), (e))
  388. #endif
  389.  
  390. #ifndef Connect
  391. #ifndef SVR4
  392. #    define Connect(a,b,c) (connect((a), (struct sockaddr *)(b), (int)(c)))
  393. #    define Bind(a,b,c) (bind((a), (struct sockaddr *)(b), (int)(c)))
  394. #    define Accept(a,b,c) (accept((a), (struct sockaddr *)(b), (int *)(c)))
  395. #else  /* SVR4 */
  396. #    define Connect(a,b,c) (connect((a), (addr_t)(b), (int)(c)))
  397. #    define Bind(a,b,c) (bind((a), (caddr_t)(b), (int)(c)))
  398. #    define Accept(a,b,c) (accept((a), (caddr_t)(b), (int *)(c)))
  399. #endif    /* SVR4 */
  400. #endif    /* Connect */
  401.  
  402. #ifndef Gettimeofday
  403. #    define Gettimeofday(a) gettimeofday(a, (struct timezone *)0)
  404. #endif /* Gettimeofday */
  405.  
  406. #ifdef GETPASS
  407. #    define Getpass getpass
  408. #endif
  409.  
  410. /* Enable connections through firewall gateways */
  411. #ifndef GATEWAY
  412. #    define GATEWAY 1
  413. #endif
  414.  
  415. #ifdef _POSIX_SOURCE
  416. #    define TERMIOS
  417. #endif
  418.  
  419. #include <stdio.h>
  420. #ifndef NO_STDLIBH
  421. #    include <stdlib.h>
  422. #else
  423. extern PTRTYPE *malloc(size_t);
  424. extern PTRTYPE *calloc(size_t, size_t);
  425. extern PTRTYPE *malloc(size_t);
  426. extern void    free(PTRTYPE *);
  427. extern PTRTYPE *realloc(PTRTYPE *, size_t);
  428. extern void    exit(int);
  429.  
  430. #ifdef NO_CONST
  431. extern char *getenv(char *);
  432. extern int atoi(char *);
  433. #else
  434. extern char *getenv(const char *);
  435. extern int atoi(const char *);
  436. #endif
  437.  
  438. #endif    /* NO_STDLIBH */
  439.  
  440. #ifdef NO_UNISTDH
  441. char *getlogin (void);
  442. #ifdef NO_CONST
  443. extern char *getenv(char *);
  444. #else
  445. extern char *getenv(const char *);
  446. #endif
  447. #endif    /* NO_UNISTDH */
  448.  
  449. #ifdef NO_STD_PROTOS
  450. #include <sys/time.h>
  451. #include <sys/types.h>
  452. #include <sys/socket.h>
  453. #include <time.h>
  454. extern    int     _filbuf(FILE *);
  455. extern    int     _flsbuf(int, FILE *);
  456. extern    int     fflush(FILE *);
  457. extern    int     fprintf(FILE *, char *, ...);
  458. extern    int     fputc(int, FILE *);
  459. extern    int     fputs(char *, FILE *);
  460. extern    int     fclose(FILE *);
  461. extern    int     pclose(FILE *);
  462. extern    void    perror(char *);
  463. extern    int     printf(char *, ...);
  464. extern    int     rewind(FILE *);
  465. extern    int     sscanf(char *, char *, ...);
  466.  
  467. extern    char *  mktemp(char *);
  468. extern    int     rename(char *, char *);
  469.  
  470. extern    int     gettimeofday(struct timeval *, struct timezone *);
  471. extern    time_t  mktime(struct tm *);
  472. extern    int     strftime(char *, int, char *, struct tm *);
  473. extern    time_t  time(time_t *);
  474.  
  475. extern    int     tolower(int);
  476.  
  477. #ifndef bcopy
  478. extern    void    bcopy(char *, char *, size_t);
  479. #endif
  480. #ifndef bzero
  481. extern    void    bzero(char *, size_t);
  482. #endif
  483.  
  484. #ifdef SOCKS 
  485. extern    int     Raccept(int, struct sockaddr *, int *);
  486. extern    int     Rbind(int, struct sockaddr *, int, unsigned long);
  487. extern    int     Rconnect(int, struct sockaddr *, int);
  488. extern    int     Rlisten(int, int);
  489. extern    int     Rgetsockname(int, struct sockaddr *, int *);
  490. #else
  491. extern    int     accept(int, struct sockaddr *, int *);
  492. extern    int     bind(int, struct sockaddr *, int);
  493. extern    int     connect(int, struct sockaddr *, int);
  494. extern    int     listen(int, int);
  495. extern    int     getsockname(int, struct sockaddr *, int *);
  496. #endif
  497. extern    int     gethostname(char *, int), getdomainname(char *, int);
  498. extern    int     select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  499. extern    int     send(int, char *, int, int);
  500. extern    int     setsockopt(int, int, int, char *, int);
  501. extern    int     shutdown(int, int);
  502. extern    int     socket(int, int, int);
  503. #endif    /* NO_STD_PROTOS */
  504.  
  505. /* eof sys.h */
  506. @
  507.  
  508.  
  509. 14020.13
  510. log
  511. @checked in with -k by alph at 1993/10/10 19:59:56
  512. @
  513. text
  514. @d6 2
  515. a7 2
  516.  *  $Revision: 14020.13 $
  517.  *  $Date: 93/06/21 06:42:11 $
  518. d9 30
  519. @
  520.