Remove extern declarations of library functions from source.c.

This could cause problems on odd systems.  The generic
  headers should be extended as needed to include necessary
  system headers or, if necessary, make explicit declarations.
Extended ac/string.h header to look for string.h/strings.h if
  STDC_HEADERS is not defined.  Also provide basic declarations for
  str*() functions.  This could cause problems on odd systems.
Extended ac/unistd.h header to define basic declaration for misc
  functions that might be missing from headers.   This includes
  externs for getenv(), getopt(), mktemp(), tempname().
Protect fax500.h from multiple inclusion.  Moved includes of
  system/generic headers back to source files.
Made mail500 helper functions static.
Fixed includes of ctype.h, signal.h, etc. to use generics.
lutil/tempname.c: was including stdlib.h twice, one should stdio.h.
Wrapped <sys/resource.h> with HAVE_SYS_RESOURCE_H.
lber/io.c/ber_get_next(): Changed noctets back to signed.
  Used with BerRead which expects signed int as second arg and
  returns signed int.
This commit is contained in:
Kurt Zeilenga 1998-11-16 05:07:27 +00:00
parent 24c5b0e791
commit b5494457d8
57 changed files with 95 additions and 151 deletions

View file

@ -1,10 +1,10 @@
#include <stdio.h>
#include <ac/ctype.h>
#include <ac/string.h>
extern char *strdup (const char *);
#ifndef FAX500_H
#define FAX500_H 1
/* in faxtotpc.c */
void strip_nonnum ( char *str );
char *remove_parens( char *ibuf, char *obuf );
char *munge_phone ( char *ibuf, char *obuf );
char *faxtotpc ( char *phone, char *userinfo );
#endif

View file

@ -19,9 +19,15 @@
*/
#include "portable.h"
#include "fax500.h"
#include <stdio.h>
#include <sys/types.h>
#include <ac/ctype.h>
#include <ac/string.h>
#include "fax500.h"
#define TPCDOMAIN "tpc.int"
/*

View file

@ -11,29 +11,32 @@
*/
#include "portable.h"
#include "fax500.h"
#include <stdio.h>
#include <stdlib.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/time.h>
#include <ac/wait.h>
#include <ac/unistd.h>
#include <ac/errno.h>
extern int optind, errno;
extern char *optarg;
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include <sysexits.h>
#include "lber.h"
#include "ldap.h"
#include "fax500.h"
#include <ldapconfig.h>
#define USER 0

View file

@ -11,21 +11,26 @@
*/
#include "portable.h"
#include "fax500.h"
#include <stdlib.h>
#include <signal.h>
#include <ac/signal.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/time.h>
#include <ac/unistd.h>
#include <ac/wait.h>
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include <lber.h>
#include <ldap.h>
#include "fax500.h"
#include <ldapconfig.h>
#define DEFAULT_PORT 79
@ -61,8 +66,6 @@ main( int argc, char **argv )
static char *attrs[] = { "title", "o", "ou", "postalAddress",
"telephoneNumber", "mail",
"facsimileTelephoneNumber", NULL };
extern char *optarg;
extern int optind;
while ( (i = getopt( argc, argv, "ab:d:f:x:z:" )) != EOF ) {
switch( i ) {

View file

@ -14,19 +14,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <signal.h>
#include <ac/ctype.h>
#include <ac/signal.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/time.h>
#include <ac/unistd.h>
#include <ac/wait.h>
extern char *strdup (const char *);
extern int strcasecmp(const char *, const char *);
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include "lber.h"
#include "ldap.h"
@ -66,7 +66,6 @@ main( int argc, char **argv )
struct sockaddr_in peername;
int peernamelen;
int interactive = 0;
extern char *optarg;
deref = FINGER_DEREF;
while ( (i = getopt( argc, argv, "f:ilp:t:x:p:c:" )) != EOF ) {

View file

@ -23,9 +23,6 @@
#include <ac/time.h>
#include <ac/unistd.h>
#include <ac/wait.h>
extern char *strdup (const char *);
extern int strcasecmp(const char *, const char *);
extern int gethostname (char *, int);
#include <ac/setproctitle.h>
@ -33,7 +30,9 @@ extern int gethostname (char *, int);
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include "ldapconfig.h"
#include "lber.h"
@ -83,7 +82,6 @@ main( int argc, char **argv )
struct hostent *hp;
struct sockaddr_in from;
int fromlen;
extern char *optarg;
#if defined( LDAP_PROCTITLE ) && !defined( HAVE_SETPROCTITLE )
/* for setproctitle */
@ -559,7 +557,7 @@ do_search( LDAP *ld, FILE *fp, char *buf )
static int
entry2textwrite( void *fp, char *buf, int len )
{
return( fwrite( buf, len, 1, (FILE *)fp ) == 0 ? -1 : len );
return( fwrite( buf, len, 1, (FILE *)fp ) == 0 ? -1 : len );
}
static void

View file

@ -23,16 +23,18 @@
#include <ac/time.h>
#include <ac/unistd.h>
#include <ac/wait.h>
extern int strcasecmp(const char *, const char *);
#include <ac/setproctitle.h>
#include <sys/resource.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include "lber.h"
#include "ldap.h"
#include "ldap_log.h"
@ -94,7 +96,6 @@ main (int argc, char **argv )
struct hostent *hp;
struct sockaddr_in from;
int fromlen;
extern char *optarg;
#if defined( LDAP_PROCTITLE ) && !defined( HAVE_SETPROCTITLE )
/* for setproctitle */

View file

@ -14,22 +14,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/time.h>
#include <ac/wait.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
extern int optind, errno;
extern char *optarg;
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include <sysexits.h>
@ -145,10 +144,10 @@ static char **get_attributes_mail_dn( LDAPMessage *e, char *attr1, char *attr2 )
static char *canonical( char *s );
static int connect_to_x500( void );
void do_group_errors( LDAPMessage *e, char *dn, char ***to, int *nto, Error **err, int *nerr );
void do_group_request( LDAPMessage *e, char *dn, char ***to, int *nto, Error **err, int *nerr );
void do_group_owner( LDAPMessage *e, char *dn, char ***to, int *nto, Error **err, int *nerr );
void add_member( char *gdn, char *dn, char ***to, int *nto, Group **togroups, int *ngroups, Error **err, int *nerr, char **suppress );
static void do_group_errors( LDAPMessage *e, char *dn, char ***to, int *nto, Error **err, int *nerr );
static void do_group_request( LDAPMessage *e, char *dn, char ***to, int *nto, Error **err, int *nerr );
static void do_group_owner( LDAPMessage *e, char *dn, char ***to, int *nto, Error **err, int *nerr );
static void add_member( char *gdn, char *dn, char ***to, int *nto, Group **togroups, int *ngroups, Error **err, int *nerr, char **suppress );
int
main ( int argc, char **argv )
@ -915,7 +914,7 @@ do_group_members(
}
}
void
static void
add_member(
char *gdn,
char *dn,
@ -985,7 +984,7 @@ add_member(
free( ndn );
}
void
static void
do_group_request(
LDAPMessage *e,
char *dn,
@ -1007,7 +1006,7 @@ do_group_request(
}
}
void
static void
do_group_errors(
LDAPMessage *e,
char *dn,
@ -1029,7 +1028,7 @@ do_group_errors(
}
}
void
static void
do_group_owner(
LDAPMessage *e,
char *dn,

View file

@ -14,8 +14,7 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/syslog.h>
extern char *strdup (const char *);
extern char *strstr (const char *, const char *);
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "rcpt500.h"
@ -57,9 +56,6 @@ main( int argc, char **argv )
int c, errflg;
char *replytext;
extern int optind;
extern char *optarg;
*reply = '\0';
if (( prog = strrchr( argv[ 0 ], '/' )) == NULL ) {

View file

@ -10,12 +10,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/time.h>
extern int strcasecmp(const char *, const char *);
#include "lber.h"
#include "ldap.h"

View file

@ -8,7 +8,6 @@
#include <ac/string.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#include <lber.h>
#include <ldap.h>
@ -36,9 +35,6 @@ main( int argc, char **argv )
FILE *fp;
int i, rc, kerberos, authmethod;
extern char *optarg;
extern int optind;
kerberos = not = verbose = contoper = 0;
fp = NULL;

View file

@ -8,7 +8,6 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#include <sys/stat.h>
@ -72,9 +71,6 @@ main( int argc, char **argv )
int rc, i, kerberos, use_ldif, authmethod;
char *usage = "usage: %s [-abcknrvF] [-d debug-level] [-h ldaphost] [-p ldapport] [-D binddn] [-w passwd] [ -f file | < entryfile ]\n";
extern char *optarg;
extern int optind;
if (( prog = strrchr( argv[ 0 ], '/' )) == NULL ) {
prog = argv[ 0 ];
} else {

View file

@ -8,7 +8,6 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#include <lber.h>
#include <ldap.h>
@ -38,9 +37,6 @@ main(int argc, char **argv)
FILE *fp;
int rc, i, kerberos, remove, havedn, authmethod;
extern char *optarg;
extern int optind;
infile = NULL;
kerberos = not = contoper = verbose = remove = 0;

View file

@ -6,9 +6,6 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
extern int strcasecmp(const char *, const char *);
extern char *mktemp(char *);
#include <lber.h>
#include <ldap.h>
@ -91,8 +88,6 @@ main( int argc, char **argv )
int rc, i, first, scope, kerberos, deref, attrsonly;
int referrals, timelimit, sizelimit, authmethod;
LDAP *ld;
extern char *optarg;
extern int optind;
infile = NULL;
deref = verbose = allow_binary = not = kerberos = vals2tmp =

View file

@ -20,7 +20,6 @@
#include <ac/string.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#ifdef HAVE_PWD_H
#include <pwd.h>

View file

@ -21,8 +21,6 @@
#include <ac/time.h>
#include <ac/wait.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
extern char * mktemp(char *);
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>

View file

@ -18,7 +18,6 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include <lber.h>
#include <ldap.h>

View file

@ -19,7 +19,6 @@
#include <ac/ctype.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#include <lber.h>
#include <ldap.h>

View file

@ -21,8 +21,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
extern char *strdup (const char *);
extern char *getenv(const char *);
#ifdef HAVE_PWD_H
#include <pwd.h>
@ -88,7 +86,6 @@ int debug; /* debug flag */
int
main( int argc, char **argv )
{
extern char *optarg; /* for parsing argv */
register int c; /* for parsing argv */
register char *cp; /* for parsing Version */

View file

@ -17,7 +17,6 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include <lber.h>
#include <ldap.h>

View file

@ -31,6 +31,8 @@
int strcmp(), strncmp();
int strcasecmp(), strncasecmp();
char *strdup();
char *strtok();
char *strpbrk();
int memcmp();
# endif

View file

@ -9,16 +9,34 @@
#if HAVE_UNISTD_H
# include <unistd.h>
#else
/* we really should test for these */
char *crypt();
char *gethostname();
char *getenv();
long *random();
int flock();
#endif
/* getopt() defines may be in separate include file */
#if HAVE_GETOPT_H
# include <getopt.h>
# include <getopt.h>
#elif !defined(HAVE_GETOPT)
/* no getopt, assume we need getopt-compat.h */
# include <getopt-compat.h>
#else
/* assume we need to declare these externs */
extern char *optarg;
extern int optind, opterr, optopt;
#endif
#ifndef HAVE_GETOPT
/* no getopt, assume we need getopt-compat.h */
# include <getopt-compat.h>
#ifndef HAVE_TEMPNAM
extern char *tempnam(const char *tmpdir, const char *prefix);
#endif
#ifndef HAVE_MKTEMP
extern char *mktemp(char *);
#endif
/* use _POSIX_VERSION for POSIX.1 code */

View file

@ -17,16 +17,6 @@ LDAP_F void lutil_detach LDAP_P((int debug, int do_close));
/* passwd.c */
LDAP_F int lutil_passwd LDAP_P((const char *cred, const char *passwd));
/* strdup.c */
#ifndef HAVE_STRDUP
char *strdup (); /* No prototype, might conflict with someone else''s */
#endif
/* tempnam.c */
#ifndef HAVE_TEMPNAM
LDAP_F char *tempnam (); /* No prototype, might conflict with someone else''s */
#endif
LDAP_END_DECL
#endif /* _LUTIL_H */

View file

@ -7,7 +7,6 @@
#include <ac/string.h>
#include <sys/types.h>
extern char *strdup (const char *);
#include "avl.h"

View file

@ -18,6 +18,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include <ac/unistd.h>
#ifdef HAVE_CONSOLE_H
#include <console.h>
@ -38,7 +39,6 @@ main( int argc, char **argv )
int tag;
BerElement ber;
Sockbuf sb;
extern char *optarg;
#ifdef HAVE_CONSOLE_H
ccommand( &argv );

View file

@ -10,6 +10,7 @@
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/unistd.h>
#ifdef HAVE_CONSOLE_H
#include <console.h>
@ -32,7 +33,6 @@ main( int argc, char **argv )
Seqorset *sos = NULLSEQORSET;
BerElement *ber;
Sockbuf sb;
extern char *optarg;
if ( argc < 2 ) {
usage( argv[0] );

View file

@ -473,7 +473,8 @@ ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber )
unsigned long tag = 0, netlen, toread;
unsigned char lc;
long rc;
unsigned int noctets, diff;
int noctets;
unsigned int diff;
#ifdef LDAP_DEBUG
if ( lber_debug )

View file

@ -22,7 +22,6 @@
#include <ac/string.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>

View file

@ -23,7 +23,6 @@
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>

View file

@ -19,7 +19,6 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include "ldap-int.h"

View file

@ -18,8 +18,6 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
extern char *strtok (char *, const char *);
#include "ldap-int.h"

View file

@ -7,7 +7,6 @@
#include <ac/string.h>
#include <ac/ctype.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include "ldap-int.h"
#include "ldapconfig.h"

View file

@ -5,7 +5,6 @@
#include <ac/socket.h>
#include <ac/string.h>
extern char *strdup (const char *);
#include "ldap-int.h"

View file

@ -19,7 +19,6 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
#include <ac/string.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#include "ldap-int.h"
@ -213,8 +212,6 @@ ldap_send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest
if ( ber_flush( lc->lconn_sb, ber, 0 ) != 0 ) {
#ifdef notyet
extern int errno;
if ( errno == EWOULDBLOCK ) {
/* need to continue write later */
lr->lr_status = LDAP_REQST_WRITING;

View file

@ -18,7 +18,6 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include "ldap-int.h"

View file

@ -8,7 +8,6 @@
#include <ac/string.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern char *strdup (const char *);
#include <sys/stat.h>
@ -278,9 +277,6 @@ main( int argc, char **argv )
int copyoptions = 0;
LDAPURLDesc *ludp;
extern char *optarg;
extern int optind;
host = NULL;
port = LDAP_PORT;
dnsuffix = "";

View file

@ -18,7 +18,6 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of
#include <ac/socket.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include "ldap-int.h"
#include "ldapconfig.h"

View file

@ -30,7 +30,6 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
extern char *strdup (const char *);
#include "ldap-int.h"

View file

@ -16,7 +16,6 @@
#include "lutil_md5.h"
#include "lutil_sha1.h"
#include "lutil.h"
extern char *crypt (const char *, const char *);
/*
*/

View file

@ -2,15 +2,15 @@
#ifndef HAVE_TEMPNAM
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <ac/string.h>
extern char *mktemp (char *);
#include <ac/unistd.h>
#include "lutil.h"
char *
tempnam( char *dir, char *pfx )
tempnam( const char *dir, const char *pfx )
{
char *s;
@ -41,4 +41,4 @@ tempnam( char *dir, char *pfx )
return( s );
}
#endif /* nextstep */
#endif /* TEMPNAM */

View file

@ -18,7 +18,6 @@
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
extern int errno;
#include <quipu/commonarg.h>
#include <quipu/ds_error.h>

View file

@ -117,8 +117,6 @@ main( int argc, char **argv )
#ifdef LDAP_PROCTITLE
char title[80];
#endif
extern char *optarg;
extern int optind;
#ifdef VMS
/* Pick up socket from inetd-type server on VMS */

View file

@ -9,6 +9,7 @@
#endif
#include <ac/ctype.h>
#include <ac/errno.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
@ -21,8 +22,6 @@
#include "slap.h"
extern int errno;
void
attr_free( Attribute *a )
{

View file

@ -8,7 +8,6 @@
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/unistd.h>
extern char *crypt ();
#include "slap.h"
#include "back-ldbm.h"

View file

@ -8,7 +8,6 @@
#include <ac/socket.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern int flock ();
#include <sys/file.h>
#include <sys/param.h>

View file

@ -68,7 +68,6 @@ main( int argc, char **argv )
char *myname;
Backend *be = NULL;
FILE *fp = NULL;
extern char *optarg;
configfile = SLAPD_DEFAULT_CONFIGFILE;
port = LDAP_PORT;

View file

@ -17,9 +17,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
#include <ac/string.h>
#include <ac/unistd.h>
#include <pwd.h>
#include <lber.h>
#include <ldap.h>
@ -39,8 +41,6 @@ main( int argc, char **argv )
{
int c, errflg;
struct ldop op;
extern int optind;
extern char *optarg;
if (( progname = strrchr( argv[ 0 ], '/' )) == NULL ) {
progname = estrdup( argv[ 0 ] );

View file

@ -18,18 +18,13 @@
#include <stdio.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <ac/stdarg.h>
#include <pwd.h>
#include <ac/string.h>
#include <ac/ctype.h>
extern long int random (void);
#include <ac/string.h>
#include <lber.h>
#include <ldap.h>

View file

@ -9,9 +9,6 @@
#include <ac/string.h>
#include <ac/time.h>
#include <ac/unistd.h> /* get link(), unlink() */
extern char *strdup (const char *);
extern char *strtok (char *, const char *);
extern char *strpbrk (const char *, const char *);
#include <lber.h>
#include <ldap.h>
@ -89,8 +86,6 @@ main( int argc, char **argv )
char buf[BUFSIZ];
int i, j, k, count;
char *s;
extern int optind;
extern char *optarg;
ldapsrcurl = NULL;
ldapdesturl = NULL;

View file

@ -16,8 +16,10 @@
#include <stdlib.h>
#include <ac/ctype.h>
#include <ac/errno.h>
#include <ac/dirent.h>
#include <ac/string.h>
#include <ac/unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -88,8 +90,6 @@ main( int argc, char **argv )
char *usage = "usage: %s [-d] [-o] [-r] [-v] [-b basedn] [-a addvalsfile] [-f fileattrdir] [-i ignoreattr...] [edbfile...]\n";
char edbfile[ MAXNAMLEN ], *basedn;
int c, rc, errflg, ignore_count, recurse;
extern int optind;
extern char *optarg;
extern char dsa_mode;
#ifdef HAVE_FILE_ATTR_DIR
extern char *file_attr_directory;
@ -856,10 +856,6 @@ free_edbmap( struct edbmap *edbmap )
static void
print_err( char *msg )
{
extern int sys_nerr;
extern char *sys_errlist[];
extern int errno;
#ifdef LDAP_DEBUG
if ( debugflg ) {
fprintf( stderr, "print_err( \"%s\" )\n", msg );

View file

@ -14,7 +14,6 @@
#include <sys/resource.h>
#include <sys/param.h>
#include <sys/stat.h>
extern int mkstemp (char *);
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@ -66,7 +65,6 @@ main( int argc, char **argv )
IDList *idl;
Backend *tbe;
int i;
extern char *optarg;
#ifdef HAVE_BERKELEY_DB2
DBC *cursorp;

View file

@ -4,6 +4,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "../slap.h"
@ -61,7 +62,6 @@ main( int argc, char **argv )
struct berval bv;
struct berval *vals[2];
Avlnode *avltypes = NULL;
extern char *optarg;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
dbnum = -1;

View file

@ -4,7 +4,7 @@
#include <ac/string.h>
#include <ac/socket.h>
extern int strcasecmp(const char *, const char *);
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "../slap.h"
@ -59,7 +59,6 @@ main( int argc, char **argv )
struct berval *vals[2];
Avlnode *avltypes = NULL;
FILE *fp;
extern char *optarg;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;
dbnum = -1;

View file

@ -4,6 +4,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include <ac/unistd.h>
#include "../slap.h"
#include "../back-ldbm/back-ldbm.h"
@ -57,7 +58,6 @@ main( int argc, char **argv )
Backend *be = NULL;
struct berval bv;
struct berval *vals[2];
extern char *optarg;
inputfile = NULL;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;

View file

@ -73,7 +73,6 @@ main( int argc, char **argv )
struct berval bv;
struct berval *vals[2];
Avlnode *avltypes = NULL;
extern char *optarg;
sbindir = DEFAULT_SBINDIR;
tailorfile = SLAPD_DEFAULT_CONFIGFILE;

View file

@ -21,6 +21,7 @@
#include <ac/string.h>
#include <ac/time.h>
#include <ac/unistd.h>
#include <lber.h>
#include <ldap.h>
@ -54,7 +55,6 @@ doargs(
)
{
int i;
extern char *optarg;
int rflag = 0;
if ( (g->myname = strrchr( argv[0], '/' )) == NULL ) {

View file

@ -22,12 +22,11 @@
#include <ac/socket.h>
#include <ac/time.h>
#include <ac/unistd.h>
extern int flock ();
#include <sys/file.h>
#include <sys/param.h>
#include "slurp.h" /* Was ../slapd/slap.h */
#include "slurp.h"
FILE *