diff options
author | Damien Miller <djm@mindrot.org> | 1999-10-28 14:12:54 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-10-28 14:12:54 +1000 |
commit | e413cba972feb60d3d4d104c0c93320435610d1b (patch) | |
tree | d712398819471c56f89ea3fc7a4fa5fb8db38690 | |
parent | 062307657e30c9b970514eb53b4b743f9d571231 (diff) |
Disabled code based on autoconf tests
-rw-r--r-- | helper.c | 16 | ||||
-rw-r--r-- | helper.h | 7 | ||||
-rw-r--r-- | mktemp.c | 5 | ||||
-rw-r--r-- | mktemp.h | 4 | ||||
-rw-r--r-- | rc4.c | 4 | ||||
-rw-r--r-- | rc4.h | 5 | ||||
-rw-r--r-- | strlcpy.c | 5 | ||||
-rw-r--r-- | strlcpy.h | 5 |
8 files changed, 45 insertions, 6 deletions
@@ -45,18 +45,15 @@ #include "rc4.h" #include "xmalloc.h" - +#include "config.h" #include "helper.h" +#ifndef HAVE_ARC4RANDOM + void get_random_bytes(unsigned char *buf, int len); static rc4_t *rc4 = NULL; -void setproctitle(const char *fmt, ...) -{ - /* FIXME */ -} - unsigned int arc4random(void) { unsigned int r; @@ -105,4 +102,11 @@ void get_random_bytes(unsigned char *buf, int len) exit(1); } } +#endif /* !HAVE_ARC4RANDOM */ +#ifndef HAVE_SETPROCTITLE +void setproctitle(const char *fmt, ...) +{ + /* FIXME */ +} +#endif /* !HAVE_SETPROCTITLE */ @@ -36,8 +36,15 @@ #ifndef _HELPER_H #define _HELPER_H +#include "config.h" + +#ifndef HAVE_ARC4RANDOM unsigned int arc4random(void); void arc4random_stir(void); +#endif /* !HAVE_ARC4RANDOM */ + +#ifndef HAVE_SETPROCTITLE void setproctitle(const char *fmt, ...); +#endif /* !HAVE_SETPROCTITLE */ #endif /* _HELPER_H */ @@ -47,8 +47,11 @@ static char rcsid[] = "$OpenBSD: mktemp.c,v 1.13 1998/06/30 23:03:13 deraadt Exp #include <ctype.h> #include <unistd.h> +#include "config.h" #include "helper.h" +#ifndef HAVE_MKDTEMP + static int _gettemp __P((char *, int *, int, int)); int @@ -181,3 +184,5 @@ _gettemp(path, doopen, domkdir, slen) } /*NOTREACHED*/ } + +#endif /* !HAVE_MKDTEMP */ @@ -1,7 +1,11 @@ #ifndef _MKTEMP_H #define _MKTEMP_H + +#include "config.h" +#ifndef HAVE_MKDTEMP int mkstemps(char *path, int slen); int mkstemp(char *path); char *mkdtemp(char *path); +#endif /* !HAVE_MKDTEMP */ #endif /* _MKTEMP_H */ @@ -41,6 +41,9 @@ /* $Id: rc4.c,v 1.1.1.1 1999/10/26 05:48:13 damien Exp $ */ +#include "config.h" + +#ifndef HAVE_ARC4RANDOM #include "rc4.h" @@ -103,3 +106,4 @@ void rc4_getbytes(rc4_t *r, unsigned char *buffer, int len) c++; } } +#endif /* !HAVE_ARC4RANDOM */ @@ -44,6 +44,9 @@ #ifndef _RC4_H #define _RC4_H +#include "config.h" +#ifndef HAVE_ARC4RANDOM + /*! \struct rc4_t \brief RC4 stream cipher state object \var s State array @@ -107,4 +110,6 @@ void rc4_crypt(rc4_t *r, unsigned char *plaintext, int len); */ void rc4_getbytes(rc4_t *r, unsigned char *buffer, int len); +#endif /* !HAVE_ARC4RANDOM */ + #endif /* _RC4_H */ @@ -34,6 +34,9 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp #include <sys/types.h> #include <string.h> +#include "config.h" +#ifndef HAVE_STRLCPY + /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). @@ -66,3 +69,5 @@ size_t strlcpy(dst, src, siz) return(s - src - 1); /* count does not include NUL */ } + +#endif /* !HAVE_STRLCPY */ @@ -1,4 +1,9 @@ #ifndef _STRLCPY_H #define _STRLCPY_H + +#include "config.h" +#ifndef HAVE_STRLCPY size_t strlcpy(char *dst, const char *src, size_t siz); +#endif /* !HAVE_STRLCPY */ + #endif /* _STRLCPY_H */ |