CVSROOT: /sources/m4 Module name: m4 Branch: branch-1_4 Changes by: Eric Blake <ericb> 06/07/07 02:40:46
Index: src/builtin.c =================================================================== RCS file: /sources/m4/m4/src/Attic/builtin.c,v retrieving revision 1.1.1.1.2.16 retrieving revision 1.1.1.1.2.17 diff -u -b -r1.1.1.1.2.16 -r1.1.1.1.2.17 --- src/builtin.c 30 Jun 2006 18:58:11 -0000 1.1.1.1.2.16 +++ src/builtin.c 7 Jul 2006 02:40:46 -0000 1.1.1.1.2.17 @@ -813,6 +813,16 @@ debug_flush_files (); sysval = system (ARG (1)); +#if FUNC_SYSTEM_BROKEN + /* OS/2 has a buggy system() that returns exit status in the lowest eight + bits, although pclose() and WEXITSTATUS are defined to return exit + status in the next eight bits. This approach can't detect signals, but + at least syscmd(`ls') still works when stdout is a terminal. An + alternate approach is popen/insert_file/pclose, but that makes stdout + a pipe, which can change how some child processes behave. */ + if (sysval != -1) + sysval <<= 8; +#endif /* FUNC_SYSTEM_BROKEN */ } static void
