And more.

This commit is contained in:
Nicholas Marriott 2010-10-27 21:34:59 +00:00
parent 914f8584ef
commit 58684ea998

View File

@ -1,4 +1,4 @@
/* $Id: compat.h,v 1.28 2010-10-27 21:33:15 nicm Exp $ */ /* $Id: compat.h,v 1.29 2010-10-27 21:34:59 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -16,6 +16,9 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef COMPAT_H
#define COMPAT_H
#ifndef __GNUC__ #ifndef __GNUC__
#define __attribute__(a) #define __attribute__(a)
#endif #endif
@ -60,10 +63,6 @@ typedef uint64_t u_int64_t;
#include "compat/bitstring.h" #include "compat/bitstring.h"
#endif #endif
#ifdef HAVE_GETOPT
#include <getopt.h>
#endif
#ifdef HAVE_CRYPT_H #ifdef HAVE_CRYPT_H
#include <crypt.h> #include <crypt.h>
#endif #endif
@ -227,7 +226,9 @@ int setenv(const char *, const char *, int);
int unsetenv(const char *); int unsetenv(const char *);
#endif #endif
#ifndef HAVE_GETOPT #ifdef HAVE_GETOPT
#include <getopt.h>
#else
/* getopt.c */ /* getopt.c */
extern int BSDopterr; extern int BSDopterr;
extern int BSDoptind; extern int BSDoptind;
@ -242,3 +243,5 @@ int BSDgetopt(int, char *const *, const char *);
#define optreset BSDoptreset #define optreset BSDoptreset
#define optarg BSDoptarg #define optarg BSDoptarg
#endif #endif
#endif /* COMPAT_H */