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

@@ -37,7 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "util/copyright.h"
#if defined(linux) || defined(sgi) || defined(CSRG_BASED)
#if defined(__linux__) || defined(sgi) || defined(CSRG_BASED)
#include <getopt.h>
#endif
#include "dbck.h"

View File

@@ -35,7 +35,7 @@
#include "tt_options.h"
#include <errno.h>
#include <string.h>
#if defined(linux) || defined(CSRG_BASED)
#if defined(__linux__) || defined(CSRG_BASED)
#include <unistd.h>
#else
#if !defined(sun)

View File

@@ -35,7 +35,7 @@
#include "tt_options.h"
#include <errno.h>
#include <string.h>
#if defined(linux) || defined(CSRG_BASED)
#if defined(__linux__) || defined(CSRG_BASED)
#include <unistd.h>
#else
#if !defined(sun)

View File

@@ -68,7 +68,7 @@ extern "C" {
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(linux)
#if !defined(__linux__)
void exit(int);
#endif
#ifdef __cplusplus

View File

@@ -39,7 +39,7 @@
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#if defined(linux)
#if defined(__linux__)
#include <unistd.h>
#endif
#if defined(sgi) || defined(CSRG_BASED)

View File

@@ -58,7 +58,7 @@ typedef int Bool;
extern char *ProgramName;
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
extern char *malloc(), *realloc();
#endif
int process_command(), auth_initialize(), auth_finalize();

View File

@@ -217,7 +217,7 @@ main(int argc, char** argv, char **envp)
#if defined(HPUX)
int asize = sizeof(saddr);
#else
# if defined(linux) || defined(CSRG_BASED) || defined(sun)
# if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
socklen_t asize = sizeof(saddr);
# else
size_t asize = sizeof(saddr);

View File

@@ -37,7 +37,7 @@
#include <stdlib.h>
#include <sys/param.h>
#include <sys/stat.h>
#if defined(linux) || defined(sun) || defined(CSRG_BASED)
#if defined(__linux__) || defined(sun) || defined(CSRG_BASED)
#include <unistd.h>
#else
#if !defined(sun)

View File

@@ -33,7 +33,7 @@
*/
#include <errno.h>
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <osfcn.h>

View File

@@ -360,7 +360,7 @@ append_real_subtrees( _Tt_string_list_ptr realtrees, _Tt_string path )
/*
* basename() - Return the last component of a pathname.
*/
#if !defined(linux)
#if !defined(__linux__)
char *basename( char *pathname ) {
char *the_basename;

View File

@@ -32,7 +32,7 @@
*
*/
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#include <osfcn.h>

View File

@@ -38,7 +38,7 @@
#include <string.h>
#include <unistd.h>
#include <signal.h>
#if defined(linux)
#if defined(__linux__)
# include <sys/poll.h>
#else
# include <poll.h>