mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* bsdlib.cc (getprogname): New function.
(setprogname): New funtion. * cygwin.din: Export getprogname and setprogname. * include/cygwin/version.h: Bumb API version number.
This commit is contained in:
parent
490d129f4a
commit
6e17cee57b
@ -1,3 +1,10 @@
|
||||
2003-11-17 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* bsdlib.cc (getprogname): New function.
|
||||
(setprogname): New funtion.
|
||||
* cygwin.din: Export getprogname and setprogname.
|
||||
* include/cygwin/version.h: Bumb API version number.
|
||||
|
||||
2003-11-15 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* include/limits.h: Revert unsanctioned changes below.
|
||||
|
@ -645,6 +645,7 @@ getpid
|
||||
_getpid = getpid
|
||||
getppid
|
||||
_getppid = getppid
|
||||
getprogname
|
||||
getpwduid
|
||||
_getpwduid = getpwduid
|
||||
getpwent
|
||||
@ -1178,6 +1179,7 @@ setpgid
|
||||
_setpgid = setpgid
|
||||
setpgrp
|
||||
_setpgrp = setpgrp
|
||||
setprogname
|
||||
setpwent
|
||||
_setpwent = setpwent
|
||||
setregid
|
||||
|
@ -227,13 +227,14 @@ details. */
|
||||
100: CW_GET_SHMLBA addition to external.cc.
|
||||
101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
|
||||
102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
|
||||
103: Export getprogname, setprogname.
|
||||
|
||||
*/
|
||||
|
||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 102
|
||||
#define CYGWIN_VERSION_API_MINOR 103
|
||||
|
||||
/* There is also a compatibity version number associated with the
|
||||
shared memory regions. It is incremented when incompatible
|
||||
|
@ -236,3 +236,25 @@ errx (int eval, const char *fmt, ...)
|
||||
vwarnx (fmt, ap);
|
||||
exit (eval);
|
||||
}
|
||||
|
||||
extern "C" const char *
|
||||
getprogname (void)
|
||||
{
|
||||
return __progname;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
setprogname (const char *newprogname)
|
||||
{
|
||||
if (!check_null_str_errno (newprogname))
|
||||
{
|
||||
/* Per BSD man page, setprogname keeps a pointer to the last
|
||||
path component of the argument. It does *not* copy the
|
||||
argument before. */
|
||||
__progname = strrchr (newprogname, '/');
|
||||
if (__progname)
|
||||
++__progname;
|
||||
else
|
||||
__progname = (char *)newprogname;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user