mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-23 00:59:51 +08:00
libgloss/
* m68k/bdm-system.c (_system): Support system(NULL).
This commit is contained in:
parent
c4f65466b9
commit
9205d8c99b
@ -1,3 +1,8 @@
|
||||
2006-06-09 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
libgloss/
|
||||
* m68k/bdm-system.c (_system): Support system(NULL).
|
||||
|
||||
2006-06-09 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
* newlib/libc/sys/arm/syscalls.c (_unlink, isatty, _system, _rename):
|
||||
|
@ -36,11 +36,11 @@ int _system (const char *command)
|
||||
gdb_parambuf_t parameters;
|
||||
|
||||
parameters[0] = (uint32_t) command;
|
||||
parameters[1] = (uint32_t) strlen (command) + 1;
|
||||
parameters[1] = command ? (uint32_t) strlen (command) + 1 : 0;
|
||||
BDM_TRAP (BDM_SYSTEM, (uint32_t)parameters);
|
||||
errno = convert_from_gdb_errno (parameters[1]);
|
||||
e = parameters[0];
|
||||
if (e >= 0)
|
||||
if (e >= 0 && command)
|
||||
{
|
||||
/* We have to convert e, an exit status to the encoded status of
|
||||
the command. To avoid hard coding the exit status, we simply
|
||||
|
Loading…
x
Reference in New Issue
Block a user