Use POSIX macros for linux

This commit is contained in:
chase
2018-05-24 16:24:41 -05:00
committed by Jon Trulson
parent 164e695cd0
commit 4f5e7fe5e3
265 changed files with 394 additions and 394 deletions

View File

@@ -81,7 +81,7 @@
extern "C" {
#endif
#if !defined(linux)
#if !defined(__linux__)
// Iconv not defined for linux. Use the EUSCompat stubs instead. */
# include <iconv.h>
#else

View File

@@ -756,7 +756,7 @@ class RFCMailBox : public DtMail::MailBox
_isPartial(DtMailEnv &error, RFCMessage *message);
DtMailBoolean
addressIsMapped(void *addressToCheck);
#if defined(linux)
#if defined(__linux__)
void alterPageMappingAdvice(MapRegion *map, int advice = 0);
#else
void alterPageMappingAdvice(

View File

@@ -63,7 +63,7 @@
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/uio.h>
#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED)
#if !defined(__aix) && !defined(__hpux) && !defined(__linux__) && !defined(CSRG_BASED)
#include <sys/systeminfo.h>
#endif
#include <sys/wait.h>
@@ -97,7 +97,7 @@ extern "C" {
#define LCL_SIG_HANDLER_SIGNATURE
#elif defined(__hpux)
#define LCL_SIG_HANDLER_SIGNATURE __harg
#elif defined(__aix) || defined(__alpha) || defined(linux) || defined(CSRG_BASED)
#elif defined(__aix) || defined(__alpha) || defined(__linux__) || defined(CSRG_BASED)
#define LCL_SIG_HANDLER_SIGNATURE int
#endif
@@ -560,7 +560,7 @@ RFCMailBox::alterPageMappingAdvice(MapRegion *map, int advice)
for (int m = 0; m < me; m++) {
MapRegion *map_t = _mappings[m];
#if !defined(linux) && !defined(sun)
#if !defined(__linux__) && !defined(sun)
// no madvise on these systems
if (map_t == map || map == (MapRegion *)-1)
madvise(map_t->map_region, (size_t) map_t->map_size, advice);
@@ -2236,7 +2236,7 @@ RFCMailBox::parseFile(DtMailEnv & error, int map_slot)
//
unsigned long pagelimit = _mappings[map_slot]->map_size;
#if !defined(linux) && !defined(sun)
#if !defined(__linux__) && !defined(sun)
// no madvise; dont use optimization
madvise(
(char *)_mappings[map_slot]->map_region,
@@ -2327,7 +2327,7 @@ RFCMailBox::parseFile(DtMailEnv & error, int map_slot)
// At this point we most likely will see random behavior. We will
// tell the kernel to pull in the minimum number of extra pages.
//
#if !defined(linux) && !defined(sun)
#if !defined(__linux__) && !defined(sun)
// no madvise; dont use optimization
madvise(
(char *)_mappings[map_slot]->map_region,
@@ -3671,7 +3671,7 @@ RFCMailBox::generateUniqueLockId(void)
char theId[128];
char hwserialbuf[64];
#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED)
#if !defined(__aix) && !defined(__hpux) && !defined(__linux__) && !defined(CSRG_BASED)
if (sysinfo(SI_HW_SERIAL, (char *)hwserialbuf, sizeof(hwserialbuf)-1) == -1)
#endif
strcpy(hwserialbuf, "dtmail");

View File

@@ -975,7 +975,7 @@ RFCTransport::signalRegister(void)
if (initialized) return;
initialized = 1;
#if defined(hpux) || defined(_aix) || defined(linux) || \
#if defined(hpux) || defined(_aix) || defined(__linux__) || \
(defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) || defined(CSRG_BASED)
// SunOS 5.5 and above defined prototype for signal handler
act.sa_handler = (void (*)(int))&RFCTransport::childHandler;

View File

@@ -59,7 +59,7 @@
#include <stropts.h>
#elif defined(HPUX)
#include <sys/poll.h>
#elif defined(_AIX) || defined(linux)
#elif defined(_AIX) || defined(__linux__)
#define INFTIM (-1) /* Infinite timeout */
#endif