Update imsg*.[ch] from OpenBSD, add some compat bits it needs and remove some

bits it doesn't.
This commit is contained in:
Nicholas Marriott
2017-03-24 10:05:53 +00:00
parent e87d808594
commit 2e5664d2df
9 changed files with 210 additions and 98 deletions

View File

@ -51,13 +51,6 @@
#include <sys/filio.h>
#endif
#ifndef HAVE_BSD_TYPES
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
#endif
#ifdef HAVE_ERR_H
#include <err.h>
#else
@ -217,6 +210,16 @@ void warnx(const char *, ...);
#define flock(fd, op) (0)
#endif
#ifndef HAVE_EXPLICIT_BZERO
/* explicit_bzero.c */
void explicit_bzero(void *, size_t);
#endif
#ifndef HAVE_GETDTABLECOUNT
/* getdtablecount.c */
int getdtablecount(void);
#endif
#ifndef HAVE_CLOSEFROM
/* closefrom.c */
void closefrom(int);
@ -317,6 +320,11 @@ void cfmakeraw(struct termios *);
void *reallocarray(void *, size_t, size_t);
#endif
#ifndef HAVE_RECALLOCARRAY
/* recallocarray.c */
void *recallocarray(void *, size_t, size_t, size_t);
#endif
#ifdef HAVE_UTF8PROC
/* utf8proc.c */
int utf8proc_wcwidth(wchar_t);