diff options
| -rw-r--r-- | liolib.c | 9 | ||||
| -rw-r--r-- | lua.c | 4 |
2 files changed, 10 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: liolib.c,v 2.28 2002/12/04 17:38:31 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.29 2002/12/20 10:26:33 roberto Exp roberto $ |
| 3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -28,6 +28,13 @@ | |||
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | #ifdef _POSIX_C_SOURCE | ||
| 32 | #if _POSIX_C_SOURCE >= 2 | ||
| 33 | #define USE_POPEN | ||
| 34 | #endif | ||
| 35 | #endif | ||
| 36 | |||
| 37 | |||
| 31 | #ifndef USE_POPEN | 38 | #ifndef USE_POPEN |
| 32 | #define pclose(f) (-1) | 39 | #define pclose(f) (-1) |
| 33 | #endif | 40 | #endif |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.112 2002/12/04 17:28:27 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.113 2002/12/04 17:38:31 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -26,7 +26,7 @@ | |||
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | #ifdef _POSIX_SOURCE | 29 | #ifdef _POSIX_C_SOURCE |
| 30 | #include <unistd.h> | 30 | #include <unistd.h> |
| 31 | #else | 31 | #else |
| 32 | static int isatty (int x) { return x==0; } /* assume stdin is a tty */ | 32 | static int isatty (int x) { return x==0; } /* assume stdin is a tty */ |
