From: rufustfirefly Date: Wed, 2 Aug 2000 19:28:05 +0000 (+0000) Subject: implemented config.h X-Git-Tag: netatalk-1-5-rc1~748 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=458fcac4e6aee7eb54ba744f57169f70cce12505;p=netatalk.git implemented config.h --- diff --git a/etc/afpd/Makefile b/etc/afpd/Makefile index 5c0c2e9f..47a2dda2 100644 --- a/etc/afpd/Makefile +++ b/etc/afpd/Makefile @@ -3,12 +3,12 @@ SRC = unix.c ofork.c main.c switch.c auth.c volume.c directory.c file.c \ enumerate.c desktop.c filedir.c fork.c appl.c gettok.c \ - status.c afp_options.c afp_asp.c afp_dsi.c messages.c config.c \ + status.c afp_options.c afp_asp.c afp_dsi.c messages.c afp_config.c \ nfsquota.c codepage.c quota.c uam.c afs.c OBJ = unix.o ofork.o main.o switch.o auth.o volume.o directory.o file.o \ enumerate.o desktop.o filedir.o fork.o appl.o gettok.o \ - status.o afp_options.o afp_asp.o afp_dsi.o messages.o config.o \ + status.o afp_options.o afp_asp.o afp_dsi.o messages.o afp_config.o \ nfsquota.o codepage.o quota.o uam.o afs.o INCPATH= -I../../include ${AFSINCPATH} @@ -89,7 +89,7 @@ afp_options.o : afp_options.c -D_PATH_AFPDNLSPATH=\"${RESDIR}/nls/\" \ ${CPPFLAGS} -c $< -config.o: config.c +afp_config.o: afp_config.c ${CC} ${CFLAGS} \ -DVERSION=\"`cat ../../VERSION`\" \ ${CPPFLAGS} -c $< diff --git a/etc/afpd/Makefile.am b/etc/afpd/Makefile.am index 5b644062..50d75bc6 100644 --- a/etc/afpd/Makefile.am +++ b/etc/afpd/Makefile.am @@ -4,10 +4,10 @@ SUBDIRS = nls sbin_PROGRAMS = afpd -afpd_SOURCES = unix.c ofork.c main.c switch.c auth.c volume.c directory.c file.c enumerate.c desktop.c filedir.c fork.c appl.c gettok.c status.c afp_options.c afp_asp.c afp_dsi.c messages.c config.c nfsquota.c codepage.c quota.c uam.c afs.c +afpd_SOURCES = unix.c ofork.c main.c switch.c auth.c volume.c directory.c file.c enumerate.c desktop.c filedir.c fork.c appl.c gettok.c status.c afp_options.c afp_asp.c afp_dsi.c messages.c afp_config.c nfsquota.c codepage.c quota.c uam.c afs.c afpd_LDADD = $(top_srcdir)/libatalk/libatalk.a -latalk -noinst_HEADERS = auth.h codepage.h config.h desktop.h directory.h file.h filedir.h fork.h globals.h icon.h misc.h status.h switch.h uam_auth.h unix.h volume.h +noinst_HEADERS = auth.h codepage.h afp_config.h desktop.h directory.h file.h filedir.h fork.h globals.h icon.h misc.h status.h switch.h uam_auth.h unix.h volume.h CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys \ -D_PATH_AFPDDEFVOL=\"$(CONFIG_DIR)/AppleVolumes.default\" \ diff --git a/etc/afpd/afp_asp.c b/etc/afpd/afp_asp.c index 57c25a7a..ceacf859 100644 --- a/etc/afpd/afp_asp.c +++ b/etc/afpd/afp_asp.c @@ -6,6 +6,10 @@ * modified from main.c. this handles afp over asp. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef NO_DDP #include diff --git a/etc/afpd/afp_config.c b/etc/afpd/afp_config.c new file mode 100644 index 00000000..8c658789 --- /dev/null +++ b/etc/afpd/afp_config.c @@ -0,0 +1,358 @@ +/* + * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) + * All Rights Reserved. See COPYRIGHT. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "globals.h" +#include "afp_config.h" +#include "uam_auth.h" +#include "status.h" + +#define LINESIZE 1024 + +/* get rid of unneeded configurations. i use reference counts to deal + * w/ multiple configs sharing the same afp_options. oh, to dream of + * garbage collection ... */ +void configfree(AFPConfig *configs, const AFPConfig *config) +{ + AFPConfig *p, *q; + + for (p = configs; p; p = q) { + q = p->next; + if (p == config) + continue; + + /* do a little reference counting */ + if (--(*p->optcount) < 1) { + afp_options_free(&p->obj.options, p->defoptions); + free(p->optcount); + } + + switch (p->obj.proto) { +#ifndef NO_DDP + case AFPPROTO_ASP: + free(p->obj.Obj); + free(p->obj.Type); + free(p->obj.Zone); + atp_close(((ASP) p->obj.handle)->asp_atp); + free(p->obj.handle); + break; +#endif /* no afp/asp */ + case AFPPROTO_DSI: + close(p->fd); + free(p->obj.handle); + break; + } + free(p); + } +} + +#ifndef NO_DDP +static void asp_cleanup(const AFPConfig *config) +{ + nbp_unrgstr(config->obj.Obj, config->obj.Type, config->obj.Zone, + &config->obj.options.ddpaddr); +} + +/* these two are almost identical. it should be possible to collapse them + * into one with minimal junk. */ +static int asp_start(AFPConfig *config, AFPConfig *configs, + server_child *server_children) +{ + ASP asp; + + if (!(asp = asp_getsession(config->obj.handle, server_children, + config->obj.options.tickleval))) { + syslog( LOG_ERR, "main: asp_getsession: %m" ); + exit( 1 ); + } + + if (asp->child) { + configfree(configs, config); /* free a bunch of stuff */ + afp_over_asp(&config->obj); + exit (0); + } +} +#endif /* no afp/asp */ + +static int dsi_start(AFPConfig *config, AFPConfig *configs, + server_child *server_children) +{ + DSI *dsi; + + if (!(dsi = dsi_getsession(config->obj.handle, server_children, + config->obj.options.tickleval))) { + syslog( LOG_ERR, "main: dsi_getsession: %m" ); + exit( 1 ); + } + + /* we've forked. */ + if (dsi->child) { + configfree(configs, config); + afp_over_dsi(&config->obj); /* start a session */ + exit (0); + } +} + +#ifndef NO_DDP +static AFPConfig *ASPConfigInit(const struct afp_options *options, + unsigned char *refcount) +{ + AFPConfig *config; + ATP atp; + ASP asp; + char *Obj, *Type = "AFPServer", *Zone = "*"; + + if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) + return NULL; + + if ((atp = atp_open(ATADDR_ANYPORT, &options->ddpaddr)) == NULL) { + syslog( LOG_ERR, "main: atp_open: %m"); + free(config); + return NULL; + } + + if ((asp = asp_init( atp )) == NULL) { + syslog( LOG_ERR, "main: asp_init: %m" ); + atp_close(atp); + free(config); + return NULL; + } + + /* register asp server */ + Obj = (char *) options->hostname; + if (nbp_name(options->server, &Obj, &Type, &Zone )) { + syslog( LOG_ERR, "main: can't parse %s", options->server ); + goto serv_free_return; + } + + /* dup Obj, Type and Zone as they get assigned to a single internal + * buffer by nbp_name */ + if ((config->obj.Obj = strdup(Obj)) == NULL) + goto serv_free_return; + + if ((config->obj.Type = strdup(Type)) == NULL) { + free(config->obj.Obj); + goto serv_free_return; + } + + if ((config->obj.Zone = strdup(Zone)) == NULL) { + free(config->obj.Obj); + free(config->obj.Type); + goto serv_free_return; + } + + /* make sure we're not registered */ + nbp_unrgstr(Obj, Type, Zone, &options->ddpaddr); + if (nbp_rgstr( atp_sockaddr( atp ), Obj, Type, Zone ) < 0 ) { + syslog( LOG_ERR, "Can't register %s:%s@%s", Obj, Type, Zone ); + free(config->obj.Obj); + free(config->obj.Type); + free(config->obj.Zone); + goto serv_free_return; + } + + syslog( LOG_INFO, "%s:%s@%s started on %u.%u:%u (%s)", Obj, Type, Zone, + ntohs( atp_sockaddr( atp )->sat_addr.s_net ), + atp_sockaddr( atp )->sat_addr.s_node, + atp_sockaddr( atp )->sat_port, VERSION ); + + config->fd = atp_fileno(atp); + config->obj.handle = asp; + config->obj.config = config; + config->obj.proto = AFPPROTO_ASP; + + memcpy(&config->obj.options, options, sizeof(struct afp_options)); + config->optcount = refcount; + (*refcount)++; + + config->server_start = asp_start; + config->server_cleanup = asp_cleanup; + + return config; + +serv_free_return: + asp_close(asp); + free(config); + return NULL; +} +#endif /* no afp/asp */ + + +static AFPConfig *DSIConfigInit(const struct afp_options *options, + unsigned char *refcount, + const dsi_proto protocol) +{ + AFPConfig *config; + DSI *dsi; + char *p, *q; + + if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) { + syslog( LOG_ERR, "DSIConfigInit: malloc(config): %m" ); + return NULL; + } + + if ((dsi = dsi_init(protocol, "afpd", options->hostname, + options->ipaddr, options->port, + options->flags & OPTION_PROXY, + options->server_quantum)) == NULL) { + syslog( LOG_ERR, "main: dsi_init: %m" ); + free(config); + return NULL; + } + + if (options->flags & OPTION_PROXY) { + syslog(LOG_INFO, "ASIP proxy initialized for %s:%d (%s)", + inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), + VERSION); + } else { + syslog(LOG_INFO, "ASIP started on %s:%d(%d) (%s)", + inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), + dsi->serversock, VERSION); + } + + config->fd = dsi->serversock; + config->obj.handle = dsi; + config->obj.config = config; + config->obj.proto = AFPPROTO_DSI; + + memcpy(&config->obj.options, options, sizeof(struct afp_options)); + /* get rid of any appletalk info. we use the fact that the DSI + * stuff is done after the ASP stuff. */ + p = config->obj.options.server; + if (p && (q = strchr(p, ':'))) + *q = '\0'; + + config->optcount = refcount; + (*refcount)++; + + config->server_start = dsi_start; + return config; +} + +/* allocate server configurations. this should really store the last + * entry in config->last or something like that. that would make + * supporting multiple dsi transports easier. */ +static AFPConfig *AFPConfigInit(const struct afp_options *options, + const struct afp_options *defoptions) +{ + AFPConfig *config = NULL, *next = NULL; + unsigned char *refcount; + + if ((refcount = (unsigned char *) + calloc(1, sizeof(unsigned char))) == NULL) { + syslog( LOG_ERR, "AFPConfigInit: calloc(refcount): %m" ); + return NULL; + } + +#ifndef NO_DDP + /* handle asp transports */ + if ((options->transports & AFPTRANS_DDP) && + (config = ASPConfigInit(options, refcount))) + config->defoptions = defoptions; +#endif + + /* handle dsi transports and dsi proxies. we only proxy + * for DSI connections. */ + + /* this should have something like the following: + * for (i=mindsi; i < maxdsi; i++) + * if (options->transports & (1 << i) && + * (next = DSIConfigInit(options, refcount, i))) + * next->defoptions = defoptions; + */ + if ((options->transports & AFPTRANS_TCP) && + (((options->flags & OPTION_PROXY) == 0) || + ((options->flags & OPTION_PROXY) && config)) + && (next = DSIConfigInit(options, refcount, DSI_TCPIP))) + next->defoptions = defoptions; + + /* load in all the authentication modules. we can load the same + things multiple times if necessary. however, loading different + things with the same names will cause complaints. by not loading + in any uams with proxies, we prevent ddp connections from succeeding. + */ + auth_load(options->uampath, options->uamlist); + + /* this should be able to accept multiple dsi transports. i think + * the only thing that gets affected is the net addresses. */ + status_init(config, next, options); + + /* attach dsi config to tail of asp config */ + if (config) { + config->next = next; + return config; + } + + return next; +} + +/* fill in the appropriate bits for each interface */ +AFPConfig *configinit(struct afp_options *cmdline) +{ + FILE *fp; + char buf[LINESIZE + 1], *p, have_option = 0; + struct afp_options options; + AFPConfig *config, *first = NULL; + + /* if config file doesn't exist, load defaults */ + if ((fp = fopen(cmdline->configfile, "r")) == NULL) + return AFPConfigInit(cmdline, cmdline); + + /* scan in the configuration file */ + while (!feof(fp)) { + if (!fgets(buf, sizeof(buf), fp) || buf[0] == '#') + continue; + + /* a little pre-processing to get rid of spaces and end-of-lines */ + p = buf; + while (p && isspace(*p)) + p++; + if (!p || (*p == '\0')) + continue; + + have_option = 1; + + memcpy(&options, cmdline, sizeof(options)); + if (!afp_options_parseline(p, &options)) + continue; + + /* this should really get a head and a tail to simplify things. */ + if (!first) { + if ((first = AFPConfigInit(&options, cmdline))) + config = first->next ? first->next : first; + } else if ((config->next = AFPConfigInit(&options, cmdline))) { + config = config->next->next ? config->next->next : config->next; + } + } + + fclose(fp); + + if (!have_option) + return AFPConfigInit(cmdline, cmdline); + + return first; +} diff --git a/etc/afpd/afp_config.h b/etc/afpd/afp_config.h new file mode 100644 index 00000000..74c49406 --- /dev/null +++ b/etc/afpd/afp_config.h @@ -0,0 +1,23 @@ +#ifndef AFPD_CONFIG_H +#define AFPD_CONFIG_H 1 + +#include +#include +#include +#include "globals.h" + +typedef struct AFPConfig { + AFPObj obj; + int fd, statuslen; + unsigned char *optcount; + char status[ATP_MAXDATA]; + const void *defoptions, *signature; + int (*server_start) __P((struct AFPConfig *, struct AFPConfig *, + server_child *)); + void (*server_cleanup) __P((const struct AFPConfig *)); + struct AFPConfig *next; +} AFPConfig; + +extern AFPConfig *configinit __P((struct afp_options *)); +extern void configfree __P((AFPConfig *, const AFPConfig *)); +#endif diff --git a/etc/afpd/afp_dsi.c b/etc/afpd/afp_dsi.c index 176921b8..79cbc899 100644 --- a/etc/afpd/afp_dsi.c +++ b/etc/afpd/afp_dsi.c @@ -6,6 +6,10 @@ * modified from main.c. this handles afp over tcp. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index 13ccf7f6..134bbf0d 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -5,6 +5,11 @@ * * modified from main.c. this handles afp options. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/afs.c b/etc/afpd/afs.c index 82f35d9d..8008d94b 100644 --- a/etc/afpd/afs.c +++ b/etc/afpd/afs.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef AFS #include diff --git a/etc/afpd/appl.c b/etc/afpd/appl.c index dcefdaff..c5d9ea06 100644 --- a/etc/afpd/appl.c +++ b/etc/afpd/appl.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/auth.c b/etc/afpd/auth.c index e302e264..01ce135b 100644 --- a/etc/afpd/auth.c +++ b/etc/afpd/auth.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/codepage.c b/etc/afpd/codepage.c index b2d0e5ae..084be7dd 100644 --- a/etc/afpd/codepage.c +++ b/etc/afpd/codepage.c @@ -19,6 +19,10 @@ * occur in those cases. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/config.c b/etc/afpd/config.c deleted file mode 100644 index d57b22d7..00000000 --- a/etc/afpd/config.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) - * All Rights Reserved. See COPYRIGHT. - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "globals.h" -#include "config.h" -#include "uam_auth.h" -#include "status.h" - -#define LINESIZE 1024 - -/* get rid of unneeded configurations. i use reference counts to deal - * w/ multiple configs sharing the same afp_options. oh, to dream of - * garbage collection ... */ -void configfree(AFPConfig *configs, const AFPConfig *config) -{ - AFPConfig *p, *q; - - for (p = configs; p; p = q) { - q = p->next; - if (p == config) - continue; - - /* do a little reference counting */ - if (--(*p->optcount) < 1) { - afp_options_free(&p->obj.options, p->defoptions); - free(p->optcount); - } - - switch (p->obj.proto) { -#ifndef NO_DDP - case AFPPROTO_ASP: - free(p->obj.Obj); - free(p->obj.Type); - free(p->obj.Zone); - atp_close(((ASP) p->obj.handle)->asp_atp); - free(p->obj.handle); - break; -#endif /* no afp/asp */ - case AFPPROTO_DSI: - close(p->fd); - free(p->obj.handle); - break; - } - free(p); - } -} - -#ifndef NO_DDP -static void asp_cleanup(const AFPConfig *config) -{ - nbp_unrgstr(config->obj.Obj, config->obj.Type, config->obj.Zone, - &config->obj.options.ddpaddr); -} - -/* these two are almost identical. it should be possible to collapse them - * into one with minimal junk. */ -static int asp_start(AFPConfig *config, AFPConfig *configs, - server_child *server_children) -{ - ASP asp; - - if (!(asp = asp_getsession(config->obj.handle, server_children, - config->obj.options.tickleval))) { - syslog( LOG_ERR, "main: asp_getsession: %m" ); - exit( 1 ); - } - - if (asp->child) { - configfree(configs, config); /* free a bunch of stuff */ - afp_over_asp(&config->obj); - exit (0); - } -} -#endif /* no afp/asp */ - -static int dsi_start(AFPConfig *config, AFPConfig *configs, - server_child *server_children) -{ - DSI *dsi; - - if (!(dsi = dsi_getsession(config->obj.handle, server_children, - config->obj.options.tickleval))) { - syslog( LOG_ERR, "main: dsi_getsession: %m" ); - exit( 1 ); - } - - /* we've forked. */ - if (dsi->child) { - configfree(configs, config); - afp_over_dsi(&config->obj); /* start a session */ - exit (0); - } -} - -#ifndef NO_DDP -static AFPConfig *ASPConfigInit(const struct afp_options *options, - unsigned char *refcount) -{ - AFPConfig *config; - ATP atp; - ASP asp; - char *Obj, *Type = "AFPServer", *Zone = "*"; - - if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) - return NULL; - - if ((atp = atp_open(ATADDR_ANYPORT, &options->ddpaddr)) == NULL) { - syslog( LOG_ERR, "main: atp_open: %m"); - free(config); - return NULL; - } - - if ((asp = asp_init( atp )) == NULL) { - syslog( LOG_ERR, "main: asp_init: %m" ); - atp_close(atp); - free(config); - return NULL; - } - - /* register asp server */ - Obj = (char *) options->hostname; - if (nbp_name(options->server, &Obj, &Type, &Zone )) { - syslog( LOG_ERR, "main: can't parse %s", options->server ); - goto serv_free_return; - } - - /* dup Obj, Type and Zone as they get assigned to a single internal - * buffer by nbp_name */ - if ((config->obj.Obj = strdup(Obj)) == NULL) - goto serv_free_return; - - if ((config->obj.Type = strdup(Type)) == NULL) { - free(config->obj.Obj); - goto serv_free_return; - } - - if ((config->obj.Zone = strdup(Zone)) == NULL) { - free(config->obj.Obj); - free(config->obj.Type); - goto serv_free_return; - } - - /* make sure we're not registered */ - nbp_unrgstr(Obj, Type, Zone, &options->ddpaddr); - if (nbp_rgstr( atp_sockaddr( atp ), Obj, Type, Zone ) < 0 ) { - syslog( LOG_ERR, "Can't register %s:%s@%s", Obj, Type, Zone ); - free(config->obj.Obj); - free(config->obj.Type); - free(config->obj.Zone); - goto serv_free_return; - } - - syslog( LOG_INFO, "%s:%s@%s started on %u.%u:%u (%s)", Obj, Type, Zone, - ntohs( atp_sockaddr( atp )->sat_addr.s_net ), - atp_sockaddr( atp )->sat_addr.s_node, - atp_sockaddr( atp )->sat_port, VERSION ); - - config->fd = atp_fileno(atp); - config->obj.handle = asp; - config->obj.config = config; - config->obj.proto = AFPPROTO_ASP; - - memcpy(&config->obj.options, options, sizeof(struct afp_options)); - config->optcount = refcount; - (*refcount)++; - - config->server_start = asp_start; - config->server_cleanup = asp_cleanup; - - return config; - -serv_free_return: - asp_close(asp); - free(config); - return NULL; -} -#endif /* no afp/asp */ - - -static AFPConfig *DSIConfigInit(const struct afp_options *options, - unsigned char *refcount, - const dsi_proto protocol) -{ - AFPConfig *config; - DSI *dsi; - char *p, *q; - - if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) { - syslog( LOG_ERR, "DSIConfigInit: malloc(config): %m" ); - return NULL; - } - - if ((dsi = dsi_init(protocol, "afpd", options->hostname, - options->ipaddr, options->port, - options->flags & OPTION_PROXY, - options->server_quantum)) == NULL) { - syslog( LOG_ERR, "main: dsi_init: %m" ); - free(config); - return NULL; - } - - if (options->flags & OPTION_PROXY) { - syslog(LOG_INFO, "ASIP proxy initialized for %s:%d (%s)", - inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), - VERSION); - } else { - syslog(LOG_INFO, "ASIP started on %s:%d(%d) (%s)", - inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), - dsi->serversock, VERSION); - } - - config->fd = dsi->serversock; - config->obj.handle = dsi; - config->obj.config = config; - config->obj.proto = AFPPROTO_DSI; - - memcpy(&config->obj.options, options, sizeof(struct afp_options)); - /* get rid of any appletalk info. we use the fact that the DSI - * stuff is done after the ASP stuff. */ - p = config->obj.options.server; - if (p && (q = strchr(p, ':'))) - *q = '\0'; - - config->optcount = refcount; - (*refcount)++; - - config->server_start = dsi_start; - return config; -} - -/* allocate server configurations. this should really store the last - * entry in config->last or something like that. that would make - * supporting multiple dsi transports easier. */ -static AFPConfig *AFPConfigInit(const struct afp_options *options, - const struct afp_options *defoptions) -{ - AFPConfig *config = NULL, *next = NULL; - unsigned char *refcount; - - if ((refcount = (unsigned char *) - calloc(1, sizeof(unsigned char))) == NULL) { - syslog( LOG_ERR, "AFPConfigInit: calloc(refcount): %m" ); - return NULL; - } - -#ifndef NO_DDP - /* handle asp transports */ - if ((options->transports & AFPTRANS_DDP) && - (config = ASPConfigInit(options, refcount))) - config->defoptions = defoptions; -#endif - - /* handle dsi transports and dsi proxies. we only proxy - * for DSI connections. */ - - /* this should have something like the following: - * for (i=mindsi; i < maxdsi; i++) - * if (options->transports & (1 << i) && - * (next = DSIConfigInit(options, refcount, i))) - * next->defoptions = defoptions; - */ - if ((options->transports & AFPTRANS_TCP) && - (((options->flags & OPTION_PROXY) == 0) || - ((options->flags & OPTION_PROXY) && config)) - && (next = DSIConfigInit(options, refcount, DSI_TCPIP))) - next->defoptions = defoptions; - - /* load in all the authentication modules. we can load the same - things multiple times if necessary. however, loading different - things with the same names will cause complaints. by not loading - in any uams with proxies, we prevent ddp connections from succeeding. - */ - auth_load(options->uampath, options->uamlist); - - /* this should be able to accept multiple dsi transports. i think - * the only thing that gets affected is the net addresses. */ - status_init(config, next, options); - - /* attach dsi config to tail of asp config */ - if (config) { - config->next = next; - return config; - } - - return next; -} - -/* fill in the appropriate bits for each interface */ -AFPConfig *configinit(struct afp_options *cmdline) -{ - FILE *fp; - char buf[LINESIZE + 1], *p, have_option = 0; - struct afp_options options; - AFPConfig *config, *first = NULL; - - /* if config file doesn't exist, load defaults */ - if ((fp = fopen(cmdline->configfile, "r")) == NULL) - return AFPConfigInit(cmdline, cmdline); - - /* scan in the configuration file */ - while (!feof(fp)) { - if (!fgets(buf, sizeof(buf), fp) || buf[0] == '#') - continue; - - /* a little pre-processing to get rid of spaces and end-of-lines */ - p = buf; - while (p && isspace(*p)) - p++; - if (!p || (*p == '\0')) - continue; - - have_option = 1; - - memcpy(&options, cmdline, sizeof(options)); - if (!afp_options_parseline(p, &options)) - continue; - - /* this should really get a head and a tail to simplify things. */ - if (!first) { - if ((first = AFPConfigInit(&options, cmdline))) - config = first->next ? first->next : first; - } else if ((config->next = AFPConfigInit(&options, cmdline))) { - config = config->next->next ? config->next->next : config->next; - } - } - - fclose(fp); - - if (!have_option) - return AFPConfigInit(cmdline, cmdline); - - return first; -} diff --git a/etc/afpd/config.h b/etc/afpd/config.h deleted file mode 100644 index 74c49406..00000000 --- a/etc/afpd/config.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef AFPD_CONFIG_H -#define AFPD_CONFIG_H 1 - -#include -#include -#include -#include "globals.h" - -typedef struct AFPConfig { - AFPObj obj; - int fd, statuslen; - unsigned char *optcount; - char status[ATP_MAXDATA]; - const void *defoptions, *signature; - int (*server_start) __P((struct AFPConfig *, struct AFPConfig *, - server_child *)); - void (*server_cleanup) __P((const struct AFPConfig *)); - struct AFPConfig *next; -} AFPConfig; - -extern AFPConfig *configinit __P((struct afp_options *)); -extern void configfree __P((AFPConfig *, const AFPConfig *)); -#endif diff --git a/etc/afpd/desktop.c b/etc/afpd/desktop.c index 6316ee35..f1de3e39 100644 --- a/etc/afpd/desktop.c +++ b/etc/afpd/desktop.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/directory.c b/etc/afpd/directory.c index 6d849ea8..25ac5004 100644 --- a/etc/afpd/directory.c +++ b/etc/afpd/directory.c @@ -6,6 +6,10 @@ * (asun@cobalt.com). */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/enumerate.c b/etc/afpd/enumerate.c index 64b97d43..fcde82c3 100644 --- a/etc/afpd/enumerate.c +++ b/etc/afpd/enumerate.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/file.c b/etc/afpd/file.c index af6da8b1..8b2a112a 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/filedir.c b/etc/afpd/filedir.c index f342b78b..ead729e7 100644 --- a/etc/afpd/filedir.c +++ b/etc/afpd/filedir.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/fork.c b/etc/afpd/fork.c index 7b1b8abb..f0fda992 100644 --- a/etc/afpd/fork.c +++ b/etc/afpd/fork.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/gettok.c b/etc/afpd/gettok.c index ea0a8e38..88aed59f 100644 --- a/etc/afpd/gettok.c +++ b/etc/afpd/gettok.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/main.c b/etc/afpd/main.c index 755ca448..c521ce5f 100644 --- a/etc/afpd/main.c +++ b/etc/afpd/main.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -33,7 +37,7 @@ #include #include "globals.h" -#include "config.h" +#include "afp_config.h" #include "status.h" #include "fork.h" #include "uam_auth.h" diff --git a/etc/afpd/messages.c b/etc/afpd/messages.c index 982a7064..95ee567a 100644 --- a/etc/afpd/messages.c +++ b/etc/afpd/messages.c @@ -2,6 +2,11 @@ * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/nfsquota.c b/etc/afpd/nfsquota.c index 03754deb..06209bc6 100644 --- a/etc/afpd/nfsquota.c +++ b/etc/afpd/nfsquota.c @@ -11,6 +11,10 @@ * Technische Universitaet Braunschweig, FRG */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/ofork.c b/etc/afpd/ofork.c index 71eb5140..d8584b73 100644 --- a/etc/afpd/ofork.c +++ b/etc/afpd/ofork.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/passwd.c b/etc/afpd/passwd.c index 99a2af6b..03b35260 100644 --- a/etc/afpd/passwd.c +++ b/etc/afpd/passwd.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/quota.c b/etc/afpd/quota.c index 25b7114e..913e0155 100644 --- a/etc/afpd/quota.c +++ b/etc/afpd/quota.c @@ -2,6 +2,11 @@ * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/status.c b/etc/afpd/status.c index a770c1ad..62534005 100644 --- a/etc/afpd/status.c +++ b/etc/afpd/status.c @@ -2,6 +2,11 @@ * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -24,7 +29,7 @@ #include "globals.h" /* includes */ #include "status.h" -#include "config.h" +#include "afp_config.h" #include "icon.h" static void status_flags(char *data, const int ipok, diff --git a/etc/afpd/status.h b/etc/afpd/status.h index a59280a4..d2038e08 100644 --- a/etc/afpd/status.h +++ b/etc/afpd/status.h @@ -5,7 +5,7 @@ #include #include #include "globals.h" -#include "config.h" +#include "afp_config.h" /* we use these to prevent whacky alignment problems */ #define AFPSTATUS_MACHOFF 0 diff --git a/etc/afpd/switch.c b/etc/afpd/switch.c index 854510b0..7f7ce973 100644 --- a/etc/afpd/switch.c +++ b/etc/afpd/switch.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include /* to pick up NULL */ #include /* works around a bug */ #include diff --git a/etc/afpd/uam.c b/etc/afpd/uam.c index 8bcc629b..60946a73 100644 --- a/etc/afpd/uam.c +++ b/etc/afpd/uam.c @@ -2,6 +2,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -23,7 +27,7 @@ #include #include "globals.h" -#include "config.h" +#include "afp_config.h" #include "auth.h" #include "uam_auth.h" diff --git a/etc/afpd/unix.c b/etc/afpd/unix.c index 4dfde805..a1ea0799 100644 --- a/etc/afpd/unix.c +++ b/etc/afpd/unix.c @@ -2,6 +2,11 @@ * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 8b73be59..fc09f98c 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/aep.c b/etc/atalkd/aep.c index 83a53230..5e5726dc 100644 --- a/etc/atalkd/aep.c +++ b/etc/atalkd/aep.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/config.c b/etc/atalkd/config.c index 1590d825..83ab824b 100644 --- a/etc/atalkd/config.c +++ b/etc/atalkd/config.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/main.c b/etc/atalkd/main.c index a05e908f..c1af5e26 100644 --- a/etc/atalkd/main.c +++ b/etc/atalkd/main.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/multicast.c b/etc/atalkd/multicast.c index 365bcecd..4f43038a 100644 --- a/etc/atalkd/multicast.c +++ b/etc/atalkd/multicast.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/nbp.c b/etc/atalkd/nbp.c index e94130d8..5e92f280 100644 --- a/etc/atalkd/nbp.c +++ b/etc/atalkd/nbp.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/route.c b/etc/atalkd/route.c index 94ee92c3..cc97b2ac 100644 --- a/etc/atalkd/route.c +++ b/etc/atalkd/route.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/rtmp.c b/etc/atalkd/rtmp.c index f5db9ef0..f8e05a1f 100644 --- a/etc/atalkd/rtmp.c +++ b/etc/atalkd/rtmp.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/atalkd/zip.c b/etc/atalkd/zip.c index 9012641e..3e2f7153 100644 --- a/etc/atalkd/zip.c +++ b/etc/atalkd/zip.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/auth.c b/etc/papd/auth.c index 90f41618..9776693e 100644 --- a/etc/papd/auth.c +++ b/etc/papd/auth.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/comment.c b/etc/papd/comment.c index db89202d..42662718 100644 --- a/etc/papd/comment.c +++ b/etc/papd/comment.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/file.c b/etc/papd/file.c index 5616d3e8..50a69861 100644 --- a/etc/papd/file.c +++ b/etc/papd/file.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/headers.c b/etc/papd/headers.c index 0b5dfc36..075c59a2 100644 --- a/etc/papd/headers.c +++ b/etc/papd/headers.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/lp.c b/etc/papd/lp.c index ed1c32a9..fbfc2be9 100644 --- a/etc/papd/lp.c +++ b/etc/papd/lp.c @@ -39,6 +39,10 @@ * Interface to lpr system. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -181,7 +185,7 @@ lp_init( out, sat ) char cost[ 22 ]; char balance[ 22 ]; #endif ABS_PRINT -#ifdef CAPDIR +#if defined( CAPDIR ) || defined( USE_CAP ) char username[32]; int addr_net, addr_node; FILE *cap_file; diff --git a/etc/papd/magics.c b/etc/papd/magics.c index a13c30df..6fb49730 100644 --- a/etc/papd/magics.c +++ b/etc/papd/magics.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/main.c b/etc/papd/main.c index ded4ecaa..a98009cd 100644 --- a/etc/papd/main.c +++ b/etc/papd/main.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/ppd.c b/etc/papd/ppd.c index d560f772..bd5406af 100644 --- a/etc/papd/ppd.c +++ b/etc/papd/ppd.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/printcap.c b/etc/papd/printcap.c index 2459e1ab..a2e0d19e 100644 --- a/etc/papd/printcap.c +++ b/etc/papd/printcap.c @@ -36,6 +36,10 @@ * SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef lint static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91"; #endif /* not lint */ diff --git a/etc/papd/queries.c b/etc/papd/queries.c index 97b84326..6a926e1b 100644 --- a/etc/papd/queries.c +++ b/etc/papd/queries.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/session.c b/etc/papd/session.c index 86584151..b142a4c8 100644 --- a/etc/papd/session.c +++ b/etc/papd/session.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/showppd.c b/etc/papd/showppd.c index 57fb7936..80e4d0d7 100644 --- a/etc/papd/showppd.c +++ b/etc/papd/showppd.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/papd/uam.c b/etc/papd/uam.c index a7ca13a1..65b63a3f 100644 --- a/etc/papd/uam.c +++ b/etc/papd/uam.c @@ -2,6 +2,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/psf/psa.c b/etc/psf/psa.c index 32675c2c..05923f68 100644 --- a/etc/psf/psa.c +++ b/etc/psf/psa.c @@ -17,6 +17,10 @@ * record in the accounting file. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include main( ac, av ) diff --git a/etc/psf/psf.c b/etc/psf/psf.c index e92c56fe..e7dd5d56 100644 --- a/etc/psf/psf.c +++ b/etc/psf/psf.c @@ -17,6 +17,10 @@ * a troff or dvi to PostScript converter. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define FUCKED #include diff --git a/etc/uams/Makefile.am b/etc/uams/Makefile.am index 72a67a2d..ca0a2b27 100644 --- a/etc/uams/Makefile.am +++ b/etc/uams/Makefile.am @@ -3,13 +3,15 @@ #SUBDIRS = uams_krb4 uamsdir = $(UAMS_PATH) -uams_LTLIBRARIES = lib_uams_dhx_pam.la lib_uams_dhx.passwd.la lib_uams_guest.la lib_uams_pam.la lib_uams_pgp.la lib_uams_randnum.la +uams_LTLIBRARIES = lib_uams_dhx_pam.la lib_uams_dhx.passwd.la lib_uams_guest.la lib_uams_pam.la lib_uams_randnum.la +# removed lib_uams_pgp.la since it doesn't currently build (AFAIK) lib_uams_dhx_pam_la_SOURCES = uams_dhx_pam.c lib_uams_dhx_passwd_la_SOURCES = uams_dhx_passwd.c lib_uams_guest_la_SOURCES = uams_guest.c lib_uams_pam_la_SOURCES = uams_pam.c -lib_uams_pgp_la_SOURCES = uams_pgp.c +#lib_uams_pgp_la_SOURCES = uams_pgp.c lib_uams_randnum_la_SOURCES = uams_randnum.c -CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys +CFLAGS = @CFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/sys \ + -DUAM_RNDNUM diff --git a/etc/uams/uams_dhx_pam.c b/etc/uams/uams_dhx_pam.c index e65b6f6a..063e5742 100644 --- a/etc/uams/uams_dhx_pam.c +++ b/etc/uams/uams_dhx_pam.c @@ -3,6 +3,11 @@ * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(USE_PAM) && defined(UAM_DHX) #include #include diff --git a/etc/uams/uams_dhx_passwd.c b/etc/uams/uams_dhx_passwd.c index 934847ce..90e4fe25 100644 --- a/etc/uams/uams_dhx_passwd.c +++ b/etc/uams/uams_dhx_passwd.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef UAM_DHX #include #include diff --git a/etc/uams/uams_guest.c b/etc/uams/uams_guest.c index 0fe9d5cb..1a6c9060 100644 --- a/etc/uams/uams_guest.c +++ b/etc/uams/uams_guest.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/uams/uams_pam.c b/etc/uams/uams_pam.c index 7b950b24..473e5e5c 100644 --- a/etc/uams/uams_pam.c +++ b/etc/uams/uams_pam.c @@ -3,6 +3,11 @@ * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef USE_PAM #include #include diff --git a/etc/uams/uams_passwd.c b/etc/uams/uams_passwd.c index 3d97959b..8afc1247 100644 --- a/etc/uams/uams_passwd.c +++ b/etc/uams/uams_passwd.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/etc/uams/uams_pgp.c b/etc/uams/uams_pgp.c index 823b060d..7d0ea59e 100644 --- a/etc/uams/uams_pgp.c +++ b/etc/uams/uams_pgp.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef UAM_PGP #include #include diff --git a/etc/uams/uams_randnum.c b/etc/uams/uams_randnum.c index 42ac4530..06f99b4f 100644 --- a/etc/uams/uams_randnum.c +++ b/etc/uams/uams_randnum.c @@ -4,6 +4,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_attr.c b/libatalk/adouble/ad_attr.c index fd00a101..a08bcd06 100644 --- a/libatalk/adouble/ad_attr.c +++ b/libatalk/adouble/ad_attr.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include diff --git a/libatalk/adouble/ad_date.c b/libatalk/adouble/ad_date.c index 0302cc42..00bb27bc 100644 --- a/libatalk/adouble/ad_date.c +++ b/libatalk/adouble/ad_date.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_flush.c b/libatalk/adouble/ad_flush.c index 180b33d6..d5195b4c 100644 --- a/libatalk/adouble/ad_flush.c +++ b/libatalk/adouble/ad_flush.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_lock.c b/libatalk/adouble/ad_lock.c index d848ccd5..29cf22f0 100644 --- a/libatalk/adouble/ad_lock.c +++ b/libatalk/adouble/ad_lock.c @@ -14,6 +14,10 @@ * sorted. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_mmap.c b/libatalk/adouble/ad_mmap.c index 433249c6..ef2a6824 100644 --- a/libatalk/adouble/ad_mmap.c +++ b/libatalk/adouble/ad_mmap.c @@ -4,6 +4,10 @@ * ad_read/ad_write routines to avoid confusion. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index e685a347..60803568 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -22,6 +22,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_read.c b/libatalk/adouble/ad_read.c index b286f556..1fcda8a1 100644 --- a/libatalk/adouble/ad_read.c +++ b/libatalk/adouble/ad_read.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_sendfile.c b/libatalk/adouble/ad_sendfile.c index 9a5ac2a8..1b96c862 100644 --- a/libatalk/adouble/ad_sendfile.c +++ b/libatalk/adouble/ad_sendfile.c @@ -8,6 +8,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_size.c b/libatalk/adouble/ad_size.c index 5773cae1..40f61906 100644 --- a/libatalk/adouble/ad_size.c +++ b/libatalk/adouble/ad_size.c @@ -5,6 +5,10 @@ * if we could depend upon inline functions, this would be one. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/adouble/ad_write.c b/libatalk/adouble/ad_write.c index b0e69ef2..0d37ebf6 100644 --- a/libatalk/adouble/ad_write.c +++ b/libatalk/adouble/ad_write.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_attn.c b/libatalk/asp/asp_attn.c index 9aa95bdd..0305b3d1 100644 --- a/libatalk/asp/asp_attn.c +++ b/libatalk/asp/asp_attn.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_close.c b/libatalk/asp/asp_close.c index b830788d..b32ae2e8 100644 --- a/libatalk/asp/asp_close.c +++ b/libatalk/asp/asp_close.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_cmdreply.c b/libatalk/asp/asp_cmdreply.c index 9acd7d9a..a4019982 100644 --- a/libatalk/asp/asp_cmdreply.c +++ b/libatalk/asp/asp_cmdreply.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_getreq.c b/libatalk/asp/asp_getreq.c index 60cdd0cd..c8373be2 100644 --- a/libatalk/asp/asp_getreq.c +++ b/libatalk/asp/asp_getreq.c @@ -22,6 +22,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_getsess.c b/libatalk/asp/asp_getsess.c index df6c39fd..da920bc5 100644 --- a/libatalk/asp/asp_getsess.c +++ b/libatalk/asp/asp_getsess.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_init.c b/libatalk/asp/asp_init.c index 431d80d1..2a00d16d 100644 --- a/libatalk/asp/asp_init.c +++ b/libatalk/asp/asp_init.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_shutdown.c b/libatalk/asp/asp_shutdown.c index afe3581e..fe6dbc81 100644 --- a/libatalk/asp/asp_shutdown.c +++ b/libatalk/asp/asp_shutdown.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_tickle.c b/libatalk/asp/asp_tickle.c index a591db48..4e0bb8e4 100644 --- a/libatalk/asp/asp_tickle.c +++ b/libatalk/asp/asp_tickle.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/asp/asp_write.c b/libatalk/asp/asp_write.c index 411eb0b2..2c5aea39 100644 --- a/libatalk/asp/asp_write.c +++ b/libatalk/asp/asp_write.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_bprint.c b/libatalk/atp/atp_bprint.c index 6d141b7c..cafacdae 100644 --- a/libatalk/atp/atp_bprint.c +++ b/libatalk/atp/atp_bprint.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define BPLEN 48 #include #include diff --git a/libatalk/atp/atp_bufs.c b/libatalk/atp/atp_bufs.c index ae79074f..ce5c11f5 100644 --- a/libatalk/atp/atp_bufs.c +++ b/libatalk/atp/atp_bufs.c @@ -25,6 +25,10 @@ * Our own memory maintenance for atp */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_close.c b/libatalk/atp/atp_close.c index 47aa9abb..be5a5b41 100644 --- a/libatalk/atp/atp_close.c +++ b/libatalk/atp/atp_close.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_open.c b/libatalk/atp/atp_open.c index cc690f79..58d61a64 100644 --- a/libatalk/atp/atp_open.c +++ b/libatalk/atp/atp_open.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_packet.c b/libatalk/atp/atp_packet.c index 6e029227..f5e43e58 100644 --- a/libatalk/atp/atp_packet.c +++ b/libatalk/atp/atp_packet.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_rreq.c b/libatalk/atp/atp_rreq.c index be11f429..f7c02b3f 100644 --- a/libatalk/atp/atp_rreq.c +++ b/libatalk/atp/atp_rreq.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_rresp.c b/libatalk/atp/atp_rresp.c index dd9cb176..d7f8639e 100644 --- a/libatalk/atp/atp_rresp.c +++ b/libatalk/atp/atp_rresp.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_sreq.c b/libatalk/atp/atp_sreq.c index 0ec1b194..e073fac2 100644 --- a/libatalk/atp/atp_sreq.c +++ b/libatalk/atp/atp_sreq.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/atp/atp_sresp.c b/libatalk/atp/atp_sresp.c index 3d73be7c..532e111c 100644 --- a/libatalk/atp/atp_sresp.c +++ b/libatalk/atp/atp_sresp.c @@ -21,6 +21,10 @@ * netatalk@itd.umich.edu */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/compat/flock.c b/libatalk/compat/flock.c index 45ec45da..4e1d7566 100644 --- a/libatalk/compat/flock.c +++ b/libatalk/compat/flock.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + static int _flock_dummy; # if defined( sun ) && defined( __svr4__ ) diff --git a/libatalk/compat/getusershell.c b/libatalk/compat/getusershell.c index bd79d4fb..4e4ed755 100644 --- a/libatalk/compat/getusershell.c +++ b/libatalk/compat/getusershell.c @@ -17,6 +17,10 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getusershell.c 5.6 (Berkeley) 6/1/90"; #endif /* LIBC_SCCS and not lint */ diff --git a/libatalk/compat/inet_aton.c b/libatalk/compat/inet_aton.c index b073b525..dee43e79 100644 --- a/libatalk/compat/inet_aton.c +++ b/libatalk/compat/inet_aton.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/compat/mktemp.c b/libatalk/compat/mktemp.c index f08bd1ec..628da6bc 100644 --- a/libatalk/compat/mktemp.c +++ b/libatalk/compat/mktemp.c @@ -17,6 +17,10 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)mktemp.c 5.9 (Berkeley) 6/1/90"; #endif /* LIBC_SCCS and not lint */ diff --git a/libatalk/compat/rquota_xdr.c b/libatalk/compat/rquota_xdr.c index f06da23e..cf311249 100644 --- a/libatalk/compat/rquota_xdr.c +++ b/libatalk/compat/rquota_xdr.c @@ -7,6 +7,10 @@ * The University of Melbourne. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include /* to get __GNU_LIBRARY__ */ static int _xdr_rquota_dummy; diff --git a/libatalk/compat/strcasecmp.c b/libatalk/compat/strcasecmp.c index 46acac36..85c70209 100644 --- a/libatalk/compat/strcasecmp.c +++ b/libatalk/compat/strcasecmp.c @@ -17,6 +17,10 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + static int _strcasecmp_dummy; # if defined( ibm032 ) diff --git a/libatalk/compat/strdup.c b/libatalk/compat/strdup.c index 04a42758..7c084dd5 100644 --- a/libatalk/compat/strdup.c +++ b/libatalk/compat/strdup.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/compat/strstr.c b/libatalk/compat/strstr.c index 2c3b2b43..c2bdd860 100644 --- a/libatalk/compat/strstr.c +++ b/libatalk/compat/strstr.c @@ -34,6 +34,10 @@ * SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strstr.c 5.2 (Berkeley) 1/26/91"; #endif /* LIBC_SCCS and not lint */ diff --git a/libatalk/dsi/dsi_attn.c b/libatalk/dsi/dsi_attn.c index 1bbfd7ee..29e6c4b1 100644 --- a/libatalk/dsi/dsi_attn.c +++ b/libatalk/dsi/dsi_attn.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_close.c b/libatalk/dsi/dsi_close.c index 3e7a2fbd..0f0d951d 100644 --- a/libatalk/dsi/dsi_close.c +++ b/libatalk/dsi/dsi_close.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_cmdreply.c b/libatalk/dsi/dsi_cmdreply.c index 4459206f..1fb833ab 100644 --- a/libatalk/dsi/dsi_cmdreply.c +++ b/libatalk/dsi/dsi_cmdreply.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_getsess.c b/libatalk/dsi/dsi_getsess.c index d4c1c6f8..24ef45db 100644 --- a/libatalk/dsi/dsi_getsess.c +++ b/libatalk/dsi/dsi_getsess.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_getstat.c b/libatalk/dsi/dsi_getstat.c index 268caf44..9758ddeb 100644 --- a/libatalk/dsi/dsi_getstat.c +++ b/libatalk/dsi/dsi_getstat.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include diff --git a/libatalk/dsi/dsi_init.c b/libatalk/dsi/dsi_init.c index 2fcc1780..6a545e94 100644 --- a/libatalk/dsi/dsi_init.c +++ b/libatalk/dsi/dsi_init.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_opensess.c b/libatalk/dsi/dsi_opensess.c index 8f16b131..e33d1d78 100644 --- a/libatalk/dsi/dsi_opensess.c +++ b/libatalk/dsi/dsi_opensess.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_read.c b/libatalk/dsi/dsi_read.c index ca922e7b..cc5a27b0 100644 --- a/libatalk/dsi/dsi_read.c +++ b/libatalk/dsi/dsi_read.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_stream.c b/libatalk/dsi/dsi_stream.c index 5b275fae..30baf613 100644 --- a/libatalk/dsi/dsi_stream.c +++ b/libatalk/dsi/dsi_stream.c @@ -9,6 +9,10 @@ * dsi_stream_receive: read a DSI header + data. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define USE_WRITEV #include diff --git a/libatalk/dsi/dsi_tcp.c b/libatalk/dsi/dsi_tcp.c index 39c7b6ae..87dee0e5 100644 --- a/libatalk/dsi/dsi_tcp.c +++ b/libatalk/dsi/dsi_tcp.c @@ -6,6 +6,10 @@ * protocol specific initialization and shutdown procedures. all the * read/write stuff is done in dsi_stream.c. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define USE_TCP_NODELAY #include diff --git a/libatalk/dsi/dsi_tickle.c b/libatalk/dsi/dsi_tickle.c index c0ba6558..3018489e 100644 --- a/libatalk/dsi/dsi_tickle.c +++ b/libatalk/dsi/dsi_tickle.c @@ -3,6 +3,10 @@ * All rights reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/dsi/dsi_write.c b/libatalk/dsi/dsi_write.c index 0acad6c7..42dca697 100644 --- a/libatalk/dsi/dsi_write.c +++ b/libatalk/dsi/dsi_write.c @@ -5,6 +5,10 @@ * 7 Oct 1997 added checks for 0 data. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + /* this streams writes */ #include #include diff --git a/libatalk/nbp/nbp_lkup.c b/libatalk/nbp/nbp_lkup.c index d3327a42..a6290e85 100644 --- a/libatalk/nbp/nbp_lkup.c +++ b/libatalk/nbp/nbp_lkup.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/nbp/nbp_rgstr.c b/libatalk/nbp/nbp_rgstr.c index 6d820693..c1f927d4 100644 --- a/libatalk/nbp/nbp_rgstr.c +++ b/libatalk/nbp/nbp_rgstr.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/nbp/nbp_unrgstr.c b/libatalk/nbp/nbp_unrgstr.c index 49cf2ace..2209bcc3 100644 --- a/libatalk/nbp/nbp_unrgstr.c +++ b/libatalk/nbp/nbp_unrgstr.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/nbp/nbp_util.c b/libatalk/nbp/nbp_util.c index 83e9180f..2985b636 100644 --- a/libatalk/nbp/nbp_util.c +++ b/libatalk/nbp/nbp_util.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/netddp/netddp_open.c b/libatalk/netddp/netddp_open.c index 999a2434..becaf6d0 100644 --- a/libatalk/netddp/netddp_open.c +++ b/libatalk/netddp/netddp_open.c @@ -7,6 +7,10 @@ * various address info if requested as well. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + static int _netddp_open_dummy; #include diff --git a/libatalk/netddp/netddp_recvfrom.c b/libatalk/netddp/netddp_recvfrom.c index b7974614..068590bc 100644 --- a/libatalk/netddp/netddp_recvfrom.c +++ b/libatalk/netddp/netddp_recvfrom.c @@ -6,6 +6,10 @@ * receive data. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + static int _netddp_recvfrom_dummy; #ifndef NO_DDP diff --git a/libatalk/netddp/netddp_sendto.c b/libatalk/netddp/netddp_sendto.c index 3e26e338..f6c9c78b 100644 --- a/libatalk/netddp/netddp_sendto.c +++ b/libatalk/netddp/netddp_sendto.c @@ -6,6 +6,10 @@ * send data. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + static int _netddp_sendto_dummy; #ifndef NO_DDP diff --git a/libatalk/pap/pap_close.c b/libatalk/pap/pap_close.c index 4257a466..b3c9953f 100644 --- a/libatalk/pap/pap_close.c +++ b/libatalk/pap/pap_close.c @@ -1,5 +1,9 @@ /* close the connection */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + int pap_close(PAP pap) { struct atp_block atpb; diff --git a/libatalk/pap/pap_init.c b/libatalk/pap/pap_init.c index 94d20a1b..1709f03b 100644 --- a/libatalk/pap/pap_init.c +++ b/libatalk/pap/pap_init.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif PAP pap_init(ATP atp) { diff --git a/libatalk/pap/pap_open.c b/libatalk/pap/pap_open.c index 9d296250..8204d228 100644 --- a/libatalk/pap/pap_open.c +++ b/libatalk/pap/pap_open.c @@ -1,5 +1,9 @@ /* moved over from bin/pap/pap.c */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + static struct { PAP pap; int tickle; diff --git a/libatalk/pap/pap_read.c b/libatalk/pap/pap_read.c index abd9014e..f8cce39a 100644 --- a/libatalk/pap/pap_read.c +++ b/libatalk/pap/pap_read.c @@ -1,5 +1,9 @@ /* taken from bin/pap/pap.c */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + int pap_read(PAP pap) { struct atp_block atpb; diff --git a/libatalk/pap/pap_sendstatus.c b/libatalk/pap/pap_sendstatus.c index 6c3ae9e9..5affb62d 100644 --- a/libatalk/pap/pap_sendstatus.c +++ b/libatalk/pap/pap_sendstatus.c @@ -1,4 +1,6 @@ - +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif int pap_sendstatus(PAP pap) { diff --git a/libatalk/pap/pap_slinit.c b/libatalk/pap/pap_slinit.c index 07403e62..d9769a1e 100644 --- a/libatalk/pap/pap_slinit.c +++ b/libatalk/pap/pap_slinit.c @@ -3,6 +3,10 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/pap/pap_tickle.c b/libatalk/pap/pap_tickle.c index b7e9a971..3d8531f3 100644 --- a/libatalk/pap/pap_tickle.c +++ b/libatalk/pap/pap_tickle.c @@ -1,4 +1,9 @@ /* send a tickle */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + void pap_tickle(PAP pap, const u_int8_t connid, struct sockaddr_at *sat) { struct atp_block atpb; diff --git a/libatalk/util/atalk_addr.c b/libatalk/util/atalk_addr.c index 0cf4cc8e..769d4e68 100644 --- a/libatalk/util/atalk_addr.c +++ b/libatalk/util/atalk_addr.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/util/bprint.c b/libatalk/util/bprint.c index c192ba75..cb0734fd 100644 --- a/libatalk/util/bprint.c +++ b/libatalk/util/bprint.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/util/getiface.c b/libatalk/util/getiface.c index 28aa0305..591ca284 100644 --- a/libatalk/util/getiface.c +++ b/libatalk/util/getiface.c @@ -4,6 +4,9 @@ * All Rights Reserved. See COPYRIGHT. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/libatalk/util/module.c b/libatalk/util/module.c index d3255349..afe2c027 100644 --- a/libatalk/util/module.c +++ b/libatalk/util/module.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/util/server_child.c b/libatalk/util/server_child.c index 82b6199d..7e26eb03 100644 --- a/libatalk/util/server_child.c +++ b/libatalk/util/server_child.c @@ -12,6 +12,10 @@ * number of connections. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/util/server_lock.c b/libatalk/util/server_lock.c index 2a5d43dc..e3669ac8 100644 --- a/libatalk/util/server_lock.c +++ b/libatalk/util/server_lock.c @@ -5,6 +5,11 @@ * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/libatalk/util/strdicasecmp.c b/libatalk/util/strdicasecmp.c index 6f3b996d..c3f6d2f4 100644 --- a/libatalk/util/strdicasecmp.c +++ b/libatalk/util/strdicasecmp.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include unsigned const char _diacasemap[] = {