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

@@ -68,7 +68,7 @@
#include "msgs.h"
#if defined(SYSV) || defined(SVR4_0) || defined(SVR4) || defined(CSRG_BASED) \
|| defined(linux) || defined(sun)
|| defined(__linux__) || defined(sun)
#define lsprintf sprintf
#endif

View File

@@ -109,7 +109,7 @@
#if _hdr_wchar && _lib_wctype && _lib_iswctype
/* on linux wchar.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -95,7 +95,7 @@
#include "defs.h"
#include <fcin.h>
/* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -235,7 +235,7 @@ OPEN_MAX_CEIL 50 AST XX 1 L OPEN_MAX
OS_VERSION 119 AES SC 1 FSU
PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096
#if _lib_getpagesize
#if defined(linux)
#if defined(__linux__)
extern int getpagesize(void);
#else
extern ssize_t getpagesize(void);

View File

@@ -239,7 +239,7 @@ OPEN_MAX_CEIL 50 AST XX 1 L OPEN_MAX
OS_VERSION 119 AES SC 1 FSU
PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096
#if _lib_getpagesize
#if defined(linux)
#if defined(__linux__)
extern int getpagesize(void);
#else
extern ssize_t getpagesize(void);

View File

@@ -16,7 +16,7 @@ cat{
#else
#undef ioctl
#endif
#if !defined(linux)
#if !defined(__linux__)
extern int ioctl(int, int, ...);
#endif
}end

View File

@@ -121,7 +121,7 @@
* workaround botched headers that assume <stdio.h>
*/
#if !defined(CSRG_BASED) && !defined(linux)
#if !defined(CSRG_BASED) && !defined(__linux__)
#ifndef FILE
#define FILE Sfio_t
#endif

View File

@@ -137,7 +137,7 @@
#define _SKIP_SFSTDIO_H
#else
#define _SFSTDIO_H
#if !defined(linux)
#if !defined(__linux__)
#define FILE int
#endif
#if defined(__STDPP__directive) && defined(__STDPP__hide)

View File

@@ -46,7 +46,7 @@
#ifndef _SFIO_H
#define _SFIO_H 1
#if defined(linux)
#if defined(__linux__)
/* HACK On linux prevent inclusion of __FILE.h that contains a conflicting
definition of __FILE that we define later */
# define ____FILE_defined 1
@@ -155,7 +155,7 @@
#define _STDIO_INCLUDED 1
#endif
#if !defined(CSRG_BASED) && !defined(linux)
#if !defined(CSRG_BASED) && !defined(__linux__)
#ifndef FILE
#define FILE Sfio_t
#endif
@@ -167,7 +167,7 @@
#endif
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
#if defined(linux)
#if defined(__linux__)
typedef struct _sfio_ FILE;
typedef struct _sfio_ __FILE;
#endif

View File

@@ -50,7 +50,7 @@
#define stdout sfstdout
#define stderr sfstderr
#define BUFSIZ SF_BUFSIZE
#if !defined(linux)
#if !defined(__linux__)
#ifdef FILE
#undef FILE
#endif

View File

@@ -302,7 +302,7 @@ loop_fa :
if(!form)
form = "";
#if (defined(CSRG_BASED) && !defined(__LP64__)) || \
(defined(linux) && !defined(__LP64__)) || defined(sun)
(defined(__linux__) && !defined(__LP64__)) || defined(sun)
GETARG(argsp,argsp,argf,args,va_list*,va_list*,'2',t_user,n_user);
memcpy((Void_t*)(&(fa->args)), (Void_t*)(&args), sizeof(va_list));
memcpy((Void_t*)(&args), (Void_t*)argsp, sizeof(va_list));

View File

@@ -121,7 +121,7 @@ __STDPP__directive pragma pp:hide endmntent getmntent
#endif
/* on linux mntent.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -99,7 +99,7 @@ __STDPP__directive pragma pp:hide getgrgid
#include <ast.h>
#include <hash.h>
/* on linux grp.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -99,7 +99,7 @@ __STDPP__directive pragma pp:hide getpwuid
#include <ast.h>
#include <hash.h>
/* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -101,7 +101,7 @@ __STDPP__directive pragma pp:hide getgrgid getgrnam getpwnam
#include <ast.h>
#include <hash.h>
/* on linux pwd.h and grp.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -96,7 +96,7 @@
#if _hdr_wchar && _lib_wctype && _lib_iswctype
/* on linux wchar.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -100,7 +100,7 @@ __STDPP__directive pragma pp:hide getpwnam getpwuid
#include <ast.h>
#include <hash.h>
/* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -97,7 +97,7 @@ static const char id[] = "\n@(#)id (AT&T Bell Laboratories) 07/17/94\0\n";
#include "FEATURE/ids"
/* on linux grp.h pwd.h can include FILE without stdio.h which clashes with sfio_t */
#if defined(linux)
#if defined(__linux__)
#ifndef __FILE_defined
#define __FILE_defined 1
#endif

View File

@@ -3738,7 +3738,7 @@ do_catopen(
nl_catd nlmsg_fd = (nl_catd)-1;
char * errmsg;
#if defined(SVR4) || defined (_AIX) || defined(CSRG_BASED) || \
defined(linux) || defined(sun)
defined(__linux__) || defined(sun)
char * nextMatch;
#endif
@@ -3763,7 +3763,7 @@ do_catopen(
altCatName = XtMalloc(strlen(catName) + 10);
#if defined(SVR4) || defined (_AIX) || defined(CSRG_BASED) || \
defined(linux) || defined(sun)
defined(__linux__) || defined(sun)
/* These platforms don't have strrstr() */
ptr = NULL;
nextMatch = catName;