#include "conf.h"

#include <ctype.h>
#include <stdio.h>


#include <sys/types.h>

/*#include <linux/socket.h>
#include <netinet/in.h>*/

#include <linux/socket.h>

#include <netdb.h>
#ifndef hpux
#include <arpa/inet.h>
#endif
#include <pwd.h>
#include <linux/errno.h>

/** For logfile locking... **/
#if !defined(NeXT) && !defined(mips) && !defined(UMAX43) && !defined(sequent)
#  include <unistd.h>
#  include <fcntl.h>
#else
#  include <fcntl.h>
#  include <sys/file.h>
#  ifndef SEEK_END
#    define SEEK_END L_XTND
#    define SEEK_SET L_SET
#  endif
#endif

extern int errno;

#ifdef __convex__
#include <stdarg.h>
#else
#include <string.h>
#endif

#ifndef hpux
#include <strings.h>
#endif
extern char *strstr();

#include <sys/stat.h>
#include <time.h>

#include <sys/param.h>
/* This might be in <sys/param.h>, usually 64 */
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN                (64)
#endif

#include "GDgopherdir.h"
#include "Dirent.h"

/*
 * Make sure we don't accidentally use a library routine instead of our
 * private restricted version.  Need to avoid the stat in struct stat
 * getting clobbered by the #define for the routine.
 */
typedef struct stat STATSTR;
#include "openers.h"
#define open	barf_ropen
#define fopen	barf_rfopen
#define stat	barf_rstat
#define opendir	barf_ropendir
#define chdir	barf_rchdir

/*** This one must be last ***/

#include "globals.h"

