add && defined(__NetBSD__) where appropriate

This commit is contained in:
christos 2012-01-28 02:05:55 +00:00
parent 139fa20f38
commit 6a35549fad
4 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@
#if (defined (__linux) || defined (linux))
#include <linux/ioctl.h>
#elif (defined (__OpenBSD__) || defined (__FreeBSD__))
#elif (defined (__OpenBSD__) || defined (__FreeBSD__) || defined(__NetBSD__))
#include <sys/ioctl.h>
#endif

View File

@ -120,7 +120,7 @@ typedef struct tdTSS_KEY {
#if (defined (__linux) || defined (linux) || defined (SOLARIS) || defined (__GLIBC__))
#define BSD_CONST
#elif (defined (__OpenBSD__) || defined (__FreeBSD__))
#elif (defined (__OpenBSD__) || defined (__FreeBSD__) || defined(__NetBSD__))
#define BSD_CONST const
#endif

View File

@ -13,7 +13,7 @@
#include <syslog.h>
#include <string.h>
#include <netdb.h>
#if (defined (__OpenBSD__) || defined (__FreeBSD__))
#if (defined (__OpenBSD__) || defined (__FreeBSD__) || defined(__NetBSD__))
#include <sys/types.h>
#include <sys/socket.h>
#endif

View File

@ -193,7 +193,7 @@ get_file_path(char *ptr, char **dest)
char tmp_buf[1024];
int i = 0;
while (isalpha(*ptr) || isdigit(*ptr) ||
while (isalpha((unsigned char)*ptr) || isdigit((unsigned char)*ptr) ||
*ptr == '/' || *ptr == '.' || *ptr == '#' || *ptr == '_' || *ptr == '-')
{
tmp_buf[i] = *ptr;
@ -310,7 +310,7 @@ read_conf_line(char *buf, int line_num, struct tcsd_config *conf)
comma = rindex(arg, ',');
if (comma == NULL) {
if (!isdigit(*arg))
if (!isdigit((unsigned char)*arg))
break;
comma = arg;
@ -339,7 +339,7 @@ read_conf_line(char *buf, int line_num, struct tcsd_config *conf)
comma = rindex(arg, ',');
if (comma == NULL) {
if (!isdigit(*arg))
if (!isdigit((unsigned char)*arg))
break;
comma = arg;