From d95d8c5393988702112b8fcd154683150227cb7a Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 9 Jan 2009 05:18:02 +0000 Subject: [PATCH] * include/sys/cygwin.h (CW_SETERRNO): Define. * external.cc (CW_SETERRNO): Implement. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to reflect the above change. * path.cc (path_prefix_p): Treat X: as equivalent to x:. * mkglobals_h: Remove unneeded #define. * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero. --- winsup/cygwin/ChangeLog | 13 +++++++++++++ winsup/cygwin/external.cc | 7 +++++++ winsup/cygwin/include/cygwin/version.h | 3 ++- winsup/cygwin/include/sys/cygwin.h | 3 ++- winsup/cygwin/mkglobals_h | 1 - winsup/cygwin/path.cc | 16 ++++++++++++++-- winsup/cygwin/spawn.cc | 3 +-- 7 files changed, 39 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 46eddfacf..a2c604c9c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,16 @@ +2009-01-09 Christopher Faylor + + * include/sys/cygwin.h (CW_SETERRNO): Define. + * external.cc (CW_SETERRNO): Implement. + * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to + reflect the above change. + + * path.cc (path_prefix_p): Treat X: as equivalent to x:. + + * mkglobals_h: Remove unneeded #define. + + * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero. + 2009-01-08 Corinna Vinschen * libc/fts.c (fts_build): Use DT_DIR case on Cygwin. diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index b880e07fb..0157fc0e4 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -363,6 +363,13 @@ cygwin_internal (cygwin_getinfo_types t, ...) const char *passwd = va_arg (arg, const char *); return setlsapwd (passwd); } + case CW_SETERRNO: + { + const char *file = va_arg (arg, const char *); + int line = va_arg (arg, int); + seterrno(file, line); + } + break; default: break; diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index b919e1c64..2de3d491f 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -340,12 +340,13 @@ details. */ 190: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc, getwchar, putwc, putwchar, ungetwc. 191: Export glob_pattern_p + 192: CW_SETERRNO added */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 191 +#define CYGWIN_VERSION_API_MINOR 192 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h index 8c1101051..7ad0bcd66 100644 --- a/winsup/cygwin/include/sys/cygwin.h +++ b/winsup/cygwin/include/sys/cygwin.h @@ -141,7 +141,8 @@ typedef enum CW_SYNC_WINENV, CW_CYGTLS_PADSIZE, CW_SET_DOS_FILE_WARNING, - CW_SET_PRIV_KEY + CW_SET_PRIV_KEY, + CW_SETERRNO } cygwin_getinfo_types; #define CW_NEXTPID 0x80000000 /* or with pid to get next one */ diff --git a/winsup/cygwin/mkglobals_h b/winsup/cygwin/mkglobals_h index 61cfef35c..1e409e01f 100755 --- a/winsup/cygwin/mkglobals_h +++ b/winsup/cygwin/mkglobals_h @@ -18,7 +18,6 @@ print <