diff options
Diffstat (limited to 'pc')
-rw-r--r-- | pc/ChangeLog | 11 | ||||
-rw-r--r-- | pc/config.h | 16 | ||||
-rw-r--r-- | pc/gawkmisc.pc | 25 | ||||
-rw-r--r-- | pc/popen.c | 4 |
4 files changed, 42 insertions, 14 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index b6d7be83..1f22bcb5 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,14 @@ +2011-01-08 Eli Zaretskii <eliz@gnu.org> + + * popen.c (scriptify): Fix syntax error. + + * config.h (HAVE___ARGZ_COUNT, HAVE___ARGZ_NEXT) + (HAVE___ARGZ_STRINGIFY): Don't define. + (HAVE_PORTALS): Remove reference. + + * gawkmisc.pc (unsetenv) [__DJGPP__]: Implement. + (usleep) [__MINGW32__]: Resurrect. + Tue Jan 4 11:20:40 2011 Arnold Robbins <arnold@skeeve.com> * config.h: Add PIPES_SIMULATED and definition of _NFILE for diff --git a/pc/config.h b/pc/config.h index a7bd593c..58fe29c6 100644 --- a/pc/config.h +++ b/pc/config.h @@ -219,19 +219,9 @@ #define SPRINTF_RET int /* return type of sprintf */ #define HAVE_MKTIME /* we have the mktime function */ /* #undef HAVE_SOCKETS */ /* we have sockets on this system */ -/* #undef HAVE_PORTALS */ /* we have portals on /p on this system */ /* #undef DYNAMIC */ /* allow dynamic addition of builtins */ /* #undef STRTOD_NOT_C89 */ /* strtod doesn't have C89 semantics */ -/* Define if you have the __argz_count function. */ -#define HAVE___ARGZ_COUNT 1 - -/* Define if you have the __argz_next function. */ -#define HAVE___ARGZ_NEXT 1 - -/* Define if you have the __argz_stringify function. */ -#define HAVE___ARGZ_STRINGIFY 1 - /* Define if you have the alarm function. */ #define HAVE_ALARM 1 @@ -287,10 +277,12 @@ /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H -#endif +#endif /* __MINGW32__ */ +#if defined(__MINGW32__) || defined(__DJGPP__) /* Define if you have the setenv function. */ -/* #define HAVE_SETENV */ +#define HAVE_SETENV 1 +#endif /* Define if you have the stpcpy function. */ /* #undef HAVE_STPCPY */ diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 0fd3a8f4..74a2d7db 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -496,4 +496,29 @@ unsetenv (const char *name) return setenv (name, "", 1); } +#include <windows.h> + +int +usleep(unsigned int usec) +{ + double msecf = usec / 1000.0; + + Sleep ((DWORD)msecf); + + return usec - msecf * 1000 < 0 ? 0 : (int)(usec - msecf * 1000); +} + #endif /* __MINGW32__ */ + +#ifdef __DJGPP__ + +int +unsetenv (const char *name) +{ + if (!name || !*name || strchr (name, '=') != NULL) + return -1; + + return putenv (name); +} + +#endif /* __DJGPP__ */ @@ -90,8 +90,8 @@ scriptify(const char *command) i = strlen(command); if ((fwrite(command, 1, i, fp) < i) || (fputc('\n', fp) == EOF)) { free(cmd); - cmd = NULL; - { + cmd = NULL; + } } else { free(cmd); cmd = NULL; |