Use POSIX macros for linux
This commit is contained in:
@@ -255,7 +255,7 @@
|
||||
/* about above. So, declare them only if we don't already have them */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#if defined(_HPUX_SOURCE) || defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(linux)
|
||||
#if defined(_HPUX_SOURCE) || defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(__linux__)
|
||||
/* the "u_types" are defined in standard files */
|
||||
# undef _INCLUDE_BSD_SOURCE
|
||||
#else
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
|
||||
|
||||
#if defined(__STDC__)
|
||||
#if !defined(linux) && !defined(_XFUNCS_H_) && !defined(sun)
|
||||
#if !defined(__linux__) && !defined(_XFUNCS_H_) && !defined(sun)
|
||||
extern void bcopy(char *b1, char *b2, int length);
|
||||
extern int bcmp(char *b1, char *b2, int length);
|
||||
extern void bzero(char *b, int length);
|
||||
@@ -70,7 +70,7 @@ extern void bzero(char *b, int length);
|
||||
|
||||
extern char *mktemp(char *tmplate);
|
||||
#elif ! defined(__cplusplus)
|
||||
#if !defined(linux) && !defined(_XFUNCS_H_)
|
||||
#if !defined(__linux__) && !defined(_XFUNCS_H_)
|
||||
extern void bcopy();
|
||||
extern int bcmp();
|
||||
extern void bzero();
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
#ifndef __DYNARRAY_H_
|
||||
#define __DYNARRAY_H_
|
||||
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
||||
#include <generic.h>
|
||||
#endif
|
||||
#if defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#define _DELETE_ARRAY(sz) delete[]
|
||||
#else
|
||||
#define _DELETE_ARRAY(sz) delete[(sz)]
|
||||
|
||||
@@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v);
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
// Rejects valid inline declarations, claiming they have both internal and
|
||||
// external linkage.
|
||||
#else
|
||||
|
||||
@@ -73,7 +73,7 @@ extern "C"
|
||||
|
||||
#ifdef __cplusplus
|
||||
char *strtokx(char *&ptr, const char *sep);
|
||||
# if !defined(linux) && !defined(sun) && !defined(CSRG_BASED)
|
||||
# if !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED)
|
||||
char **strsep(const char *str, const char *sep,
|
||||
boolean whsp = TRUE, int *num = NULL);
|
||||
const char *strcmbn(const char **vec, const char *sep = " ");
|
||||
@@ -81,7 +81,7 @@ extern "C"
|
||||
|
||||
#else /* __STDC__ */
|
||||
char *strtokx(char **ptr, const char *sep);
|
||||
# if !defined(linux) && !defined(sun) && !defined(CSRG_BASED)
|
||||
# if !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED)
|
||||
char **strsep(const char *str, const char *sep,
|
||||
boolean whsp, int *num);
|
||||
#endif
|
||||
@@ -119,7 +119,7 @@ extern size_t nl_strlen(); /* __OBSOLETE */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
#if defined(apollo) || defined(__aix) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(apollo) || defined(__aix) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
|
||||
Reference in New Issue
Block a user