change BSD ifndefs to __OpenBSD__ and remove unnecessary ifdefs
I'm not sure if any operating system other than OpenBSD has strlcpy/strlcat. May need to use a configure script for this later on.
This commit is contained in:
parent
03b3631fa9
commit
cae9985747
5 changed files with 8 additions and 10 deletions
2
lcl.c
2
lcl.c
|
@ -9,7 +9,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef BSD
|
#ifdef __OpenBSD__
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
4
lfs.c
4
lfs.c
|
@ -12,9 +12,7 @@
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef BSD
|
#include <string.h>
|
||||||
# include <string.h>
|
|
||||||
#endif
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/***
|
/***
|
||||||
* Processes, signals, and
|
* Processes, signals, and signal handlers.
|
||||||
* signal handlers.
|
*
|
||||||
* @module process
|
* @module process
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef BSD
|
#ifdef __OpenBSD__
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
2
util.c
2
util.c
|
@ -37,7 +37,7 @@ lfailm(lua_State *L, const char *mesg)
|
||||||
* lib/libc/string/strlcat.c and
|
* lib/libc/string/strlcat.c and
|
||||||
* lib/libc/string/strlcpy.c respectively
|
* lib/libc/string/strlcpy.c respectively
|
||||||
*/
|
*/
|
||||||
#ifndef BSD
|
#ifndef __OpenBSD__
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Appends src to string dst of size dsize (unlike strncat, dsize is the
|
* Appends src to string dst of size dsize (unlike strncat, dsize is the
|
||||||
|
|
4
util.h
4
util.h
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
#define _UTIL_H_
|
#define _UTIL_H_
|
||||||
|
|
||||||
#include <string.h>
|
#include <stddef.h>
|
||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
|
|
||||||
int lfail(lua_State *);
|
int lfail(lua_State *);
|
||||||
int lfailm(lua_State *, const char *);
|
int lfailm(lua_State *, const char *);
|
||||||
|
|
||||||
#ifndef BSD
|
#ifndef __OpenBSD__
|
||||||
size_t strlcat(char *, const char *, size_t);
|
size_t strlcat(char *, const char *, size_t);
|
||||||
size_t strlcpy(char *, const char *, size_t);
|
size_t strlcpy(char *, const char *, size_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue