Use POSIX macros for linux
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -68,7 +68,7 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#if !defined(linux)
|
||||
#if !defined(__linux__)
|
||||
void exit(int);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user