зеркало из https://github.com/Azure/sonic-openssh.git
Disabled code based on autoconf tests
This commit is contained in:
Родитель
062307657e
Коммит
e413cba972
16
helper.c
16
helper.c
|
@ -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 */
|
||||
|
|
7
helper.h
7
helper.h
|
@ -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 */
|
||||
|
|
5
mktemp.c
5
mktemp.c
|
@ -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 */
|
||||
|
|
4
mktemp.h
4
mktemp.h
|
@ -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 */
|
||||
|
|
4
rc4.c
4
rc4.c
|
@ -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 */
|
||||
|
|
5
rc4.h
5
rc4.h
|
@ -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 */
|
||||
|
|
Загрузка…
Ссылка в новой задаче