Use POSIX macros for linux
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
#include <Xm/Xm.h>
|
||||
#include <X11/Xos.h>
|
||||
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#if defined(__linux__) || defined(CSRG_BASED)
|
||||
#define _NFILE FOPEN_MAX
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ extern char * _DtTermPrimGetMessage( char *filename, int set, int n, char *s );
|
||||
#include <ctype.h>
|
||||
#include <nl_types.h>
|
||||
#include <wchar.h>
|
||||
#if defined(linux) || defined(hpV4)
|
||||
#if defined(__linux__) || defined(hpV4)
|
||||
# include <sys/types.h> /* For FD_* macros. */
|
||||
# include <sys/time.h> /* For select() prototype. */
|
||||
#else
|
||||
|
||||
@@ -39,7 +39,7 @@ static char rcs_id[] = "$XConsortium: TermPrimDebug.c /main/4 1996/11/21 19:58:1
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
|
||||
@@ -49,7 +49,7 @@ static char rcs_id[] = "$TOG: TermPrimGetPty-clone.c /main/7 1998/04/03 17:11:08
|
||||
|
||||
#if defined(__AIX)
|
||||
# define PTY_CLONE_DEVICE "/dev/ptc"
|
||||
#elif defined(linux)
|
||||
#elif defined(__linux__)
|
||||
# define PTY_CLONE_DEVICE "/dev/ptyc"
|
||||
#endif /* __AIX */
|
||||
|
||||
@@ -72,7 +72,7 @@ GetPty(char **ptySlave, char **ptyMaster)
|
||||
|
||||
if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) {
|
||||
_Xttynameparams tty_buf;
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
if (c = _XTtyname(ptyFd)) {
|
||||
#else
|
||||
if (c = _XTtyname(ptyFd, tty_buf)) {
|
||||
|
||||
@@ -43,14 +43,14 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-svr4.c /main/1 1996/04/21 1
|
||||
#include "TermPrimOSDepI.h"
|
||||
#include "TermPrimDebug.h"
|
||||
#include "TermHeader.h"
|
||||
#if !defined(linux)
|
||||
#if !defined(__linux__)
|
||||
#include <stropts.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/stream.h>
|
||||
#endif
|
||||
#include <sys/termios.h>
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#undef USE_STREAMS_BUFMOD
|
||||
#endif
|
||||
|
||||
@@ -260,7 +260,7 @@ SetupPty(char *ptySlave, int ptyFd)
|
||||
* they don't seem to stick after the file is closed on
|
||||
* SVR4.2. Not sure where else this applies.
|
||||
*/
|
||||
#if !defined(linux)
|
||||
#if !defined(__linux__)
|
||||
if (ioctl(ptyFd, I_PUSH, "ptem") == -1) {
|
||||
(void) perror("Error pushing ptem");
|
||||
/* exit the subprocess */
|
||||
|
||||
@@ -385,7 +385,7 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
|
||||
(void) strncpy(utPtr->ut_id, utmpLine,
|
||||
sizeof(utPtr->ut_id));
|
||||
#else /* __AIX */
|
||||
#if defined(linux) || defined(sun)
|
||||
#if defined(__linux__) || defined(sun)
|
||||
if (c = strchr(utmpLine, '/')) {
|
||||
c++;
|
||||
} else {
|
||||
@@ -401,7 +401,7 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
|
||||
|
||||
/* set up the new entry... */
|
||||
utPtr->ut_type = USER_PROCESS;
|
||||
#if !defined(linux)
|
||||
#if !defined(__linux__)
|
||||
utPtr->ut_exit.e_termination = 0;
|
||||
utPtr->ut_exit.e_exit = 2;
|
||||
#endif
|
||||
@@ -528,7 +528,7 @@ UtmpEntryDestroy(Widget w, char *utmpLine)
|
||||
(void) setutent();
|
||||
if (utPtr = getutline(&ut)) {
|
||||
utPtr->ut_type = DEAD_PROCESS;
|
||||
#if !defined(linux)
|
||||
#if !defined(__linux__)
|
||||
utPtr->ut_exit.e_termination = 0;
|
||||
utPtr->ut_exit.e_exit = 0;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user