Use POSIX macros for linux
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#include <locale.h>
|
||||
#include <fcntl.h>
|
||||
@@ -178,7 +178,7 @@ EXTERN char dirsep
|
||||
#if defined(MSDOS)
|
||||
INIT('\\')
|
||||
#else
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
INIT('/')
|
||||
#else
|
||||
****define directory separator here****
|
||||
@@ -186,7 +186,7 @@ INIT('/')
|
||||
#endif
|
||||
;
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#define CSEP '/'
|
||||
#define SSEP "/"
|
||||
#else
|
||||
|
||||
@@ -357,7 +357,7 @@ char *qualname;
|
||||
char *unqualname;
|
||||
#endif
|
||||
{
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
|
||||
FILE *f;
|
||||
#endif
|
||||
@@ -382,7 +382,7 @@ else
|
||||
|
||||
fnp = fn;
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
qualname[0] = '\0';
|
||||
gp = qualname + strlen(qualname);
|
||||
roomleft = roomleft - strlen(qualname);
|
||||
@@ -496,7 +496,7 @@ do {
|
||||
while (1);
|
||||
*strrchr(qualname, CSEP) = '\0';
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#else
|
||||
strupr ( qualname );
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ int main(argc, argv)
|
||||
{
|
||||
M_WCHAR *wc_userdef;
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
m_outfile = stdout;
|
||||
m_errfile = stderr;
|
||||
#endif
|
||||
@@ -90,7 +90,7 @@ static char sopt[] =
|
||||
static char name[] = "m_name = '%s'\n" ;
|
||||
static char literal[] = "m_literal = '%s'\n" ;
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__)
|
||||
char buffer[M_LITLEN + 80] ;
|
||||
#else
|
||||
#define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d))
|
||||
|
||||
@@ -439,7 +439,7 @@ M_PAREXTERN int m_argc ;
|
||||
M_PAREXTERN char **m_argv ;
|
||||
|
||||
/* PARSER output file */
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(__linux__) || defined(CSRG_BASED)
|
||||
M_PAREXTERN FILE *m_outfile;
|
||||
M_PAREXTERN FILE *m_errfile;
|
||||
#else
|
||||
|
||||
@@ -357,7 +357,7 @@ char *qualname;
|
||||
char *unqualname;
|
||||
#endif
|
||||
{
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
FILE *f;
|
||||
#endif
|
||||
char fn[FNAMELEN];
|
||||
@@ -381,7 +381,7 @@ else
|
||||
|
||||
fnp = fn;
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
qualname[0] = '\0';
|
||||
gp = qualname + strlen(qualname);
|
||||
roomleft = roomleft - strlen(qualname);
|
||||
@@ -495,7 +495,7 @@ do {
|
||||
while (1);
|
||||
*strrchr(qualname, CSEP) = '\0';
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#else
|
||||
strupr ( qualname );
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@ int main(argc, argv)
|
||||
"prevcon=%d,token=%d,curcon=%d,scanval='%c'(%d),line=%d,netlevel=%d\n" ;
|
||||
static char name[] = "m_name = '%s'\n" ;
|
||||
static char literal[] = "m_literal = '%s'\n" ;
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__)
|
||||
char buffer[M_LITLEN + 80] ;
|
||||
#else
|
||||
#define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d))
|
||||
@@ -55,7 +55,7 @@ int main(argc, argv)
|
||||
sizeof(literal) + M_LITLEN - 2)] ;
|
||||
#endif
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
m_outfile = stdout;
|
||||
m_errfile = stderr;
|
||||
#endif
|
||||
|
||||
@@ -437,7 +437,7 @@ M_PAREXTERN int m_argc ;
|
||||
M_PAREXTERN char **m_argv ;
|
||||
|
||||
/* PARSER output file */
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(__linux__) || defined(CSRG_BASED)
|
||||
M_PAREXTERN FILE *m_outfile;
|
||||
M_PAREXTERN FILE *m_errfile;
|
||||
#else
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#include <locale.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
# include <sys/fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void main(argc, argv)
|
||||
sizeof(literal) + M_LITLEN - 2)] ;
|
||||
#endif
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
m_outfile = stdout;
|
||||
m_errfile = stderr;
|
||||
#endif
|
||||
|
||||
@@ -437,7 +437,7 @@ M_PAREXTERN int m_argc ;
|
||||
M_PAREXTERN char **m_argv ;
|
||||
|
||||
/* PARSER output file */
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(__linux__) || defined(CSRG_BASED)
|
||||
M_PAREXTERN FILE *m_outfile;
|
||||
M_PAREXTERN FILE *m_errfile;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user