150477Speter/*
214330Speter * Copyright (c) 1995 - 2001 Kungliga Tekniska H��gskolan
314330Speter * (Royal Institute of Technology, Stockholm, Sweden).
414330Speter * All rights reserved.
568519Smarcel *
614330Speter * Redistribution and use in source and binary forms, with or without
7155374Srwatson * modification, are permitted provided that the following conditions
814330Speter * are met:
9146806Srwatson *
10146806Srwatson * 1. Redistributions of source code must retain the above copyright
11146806Srwatson *    notice, this list of conditions and the following disclaimer.
12146806Srwatson *
13146806Srwatson * 2. Redistributions in binary form must reproduce the above copyright
14156842Snetchild *    notice, this list of conditions and the following disclaimer in the
1514330Speter *    documentation and/or other materials provided with the distribution.
1614330Speter *
1714330Speter * 3. Neither the name of the Institute nor the names of its contributors
1814330Speter *    may be used to endorse or promote products derived from this software
1914330Speter *    without specific prior written permission.
2014330Speter *
2114330Speter * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
2214330Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23160797Sjhb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2414330Speter * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25160797Sjhb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2614330Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2714330Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2814330Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2914330Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30143197Ssobomax * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3114330Speter * SUCH DAMAGE.
3268583Smarcel */
3314330Speter
34143197Ssobomax/* $Id$ */
35143197Ssobomax
36143197Ssobomax#ifndef __FTP_LOCL_H__
3714330Speter#define __FTP_LOCL_H__
3814330Speter
39146806Srwatson#ifdef HAVE_CONFIG_H
40160798Sjhb#include <config.h>
41146806Srwatson#endif
42160798Sjhb
43160798Sjhb#ifdef HAVE_PWD_H
44146806Srwatson#include <pwd.h>
45160798Sjhb#endif
46146806Srwatson#include <signal.h>
47160798Sjhb#include <stdio.h>
48146806Srwatson#include <stdlib.h>
49160798Sjhb#include <stdarg.h>
50160798Sjhb#include <string.h>
51146806Srwatson#ifdef TIME_WITH_SYS_TIME
52160798Sjhb#include <sys/time.h>
53146806Srwatson#include <time.h>
54160798Sjhb#elif defined(HAVE_SYS_TIME_H)
55160798Sjhb#include <sys/time.h>
56160798Sjhb#else
57146806Srwatson#include <time.h>
58160798Sjhb#endif
59160798Sjhb#ifdef HAVE_UNISTD_H
60160798Sjhb#include <unistd.h>
61146806Srwatson#endif
62160798Sjhb
63146806Srwatson#ifdef HAVE_SYS_TYPES_H
64160798Sjhb#include <sys/types.h>
65146806Srwatson#endif
66146806Srwatson#ifdef HAVE_SYS_PARAM_H
67160798Sjhb#include <sys/param.h>
68156842Snetchild#endif
69160798Sjhb#ifdef HAVE_SYS_RESOURCE_H
70146806Srwatson#include <sys/resource.h>
71160798Sjhb#endif
72160798Sjhb#ifdef HAVE_SYS_WAIT_H
73146806Srwatson#include <sys/wait.h>
74146806Srwatson#endif
75160798Sjhb#ifdef HAVE_SYS_STAT_H
76160798Sjhb#include <sys/stat.h>
77160798Sjhb#endif
78160798Sjhb#ifdef HAVE_SYS_SOCKET_H
79160798Sjhb#include <sys/socket.h>
80146806Srwatson#endif
81160798Sjhb
82160798Sjhb#ifdef HAVE_NETINET_IN_H
83156842Snetchild#include <netinet/in.h>
84160798Sjhb#endif
85160798Sjhb#ifdef HAVE_NETINET_IN_SYSTM_H
86146806Srwatson#include <netinet/in_systm.h>
87146806Srwatson#endif
88146806Srwatson#ifdef HAVE_NETINET_IP_H
89160798Sjhb#include <netinet/ip.h>
90160798Sjhb#endif
91146806Srwatson
92160798Sjhb#ifdef HAVE_ARPA_FTP_H
93160798Sjhb#include <arpa/ftp.h>
94160798Sjhb#endif
95160798Sjhb#ifdef HAVE_ARPA_INET_H
96160798Sjhb#include <arpa/inet.h>
97160798Sjhb#endif
98160798Sjhb#ifdef HAVE_ARPA_TELNET_H
99160798Sjhb#include <arpa/telnet.h>
100146806Srwatson#endif
101160798Sjhb
102160798Sjhb#include <errno.h>
103160798Sjhb#include <ctype.h>
104160798Sjhb#include <glob.h>
105146806Srwatson#ifdef HAVE_NETDB_H
106160798Sjhb#include <netdb.h>
107160798Sjhb#endif
108160798Sjhb
109160798Sjhb#ifdef HAVE_SYS_MMAN_H
110146806Srwatson#include <sys/mman.h>
111160798Sjhb#endif
112146806Srwatson
113160798Sjhb#include <err.h>
114146806Srwatson
115146806Srwatson#ifdef SOCKS
116160798Sjhb#include <socks.h>
117146806Srwatsonextern int LIBPREFIX(fclose)      (FILE *);
118160798Sjhb
119160798Sjhb/* This doesn't belong here. */
120160798Sjhbstruct tm *localtime(const time_t *);
121160798Sjhbstruct hostent  *gethostbyname(const char *);
122146806Srwatson
123161305Snetchild#endif
124161305Snetchild
125161305Snetchild#include "ftp_var.h"
126161305Snetchild#include "extern.h"
127160798Sjhb#include "common.h"
128146806Srwatson#include "pathnames.h"
129146806Srwatson
130160798Sjhb#include "roken.h"
131160798Sjhb#include "security.h"
132160798Sjhb
133146806Srwatson/* des_read_pw_string */
134160798Sjhb#include "crypto-headers.h"
135146806Srwatson
136160798Sjhb#if defined(__sun__) && !defined(__svr4)
137146806Srwatsonint fclose(FILE*);
138160798Sjhbint pclose(FILE*);
139160798Sjhb#endif
140156842Snetchild
141160798Sjhb#endif /* __FTP_LOCL_H__ */
142146806Srwatson