* 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>
|
2003-11-15 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* include/limits.h: Revert unsanctioned changes below.
|
* include/limits.h: Revert unsanctioned changes below.
|
||||||
|
@ -645,6 +645,7 @@ getpid
|
|||||||
_getpid = getpid
|
_getpid = getpid
|
||||||
getppid
|
getppid
|
||||||
_getppid = getppid
|
_getppid = getppid
|
||||||
|
getprogname
|
||||||
getpwduid
|
getpwduid
|
||||||
_getpwduid = getpwduid
|
_getpwduid = getpwduid
|
||||||
getpwent
|
getpwent
|
||||||
@ -1178,6 +1179,7 @@ setpgid
|
|||||||
_setpgid = setpgid
|
_setpgid = setpgid
|
||||||
setpgrp
|
setpgrp
|
||||||
_setpgrp = setpgrp
|
_setpgrp = setpgrp
|
||||||
|
setprogname
|
||||||
setpwent
|
setpwent
|
||||||
_setpwent = setpwent
|
_setpwent = setpwent
|
||||||
setregid
|
setregid
|
||||||
|
@ -227,13 +227,14 @@ details. */
|
|||||||
100: CW_GET_SHMLBA addition to external.cc.
|
100: CW_GET_SHMLBA addition to external.cc.
|
||||||
101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
|
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.
|
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 */
|
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||||
|
|
||||||
#define CYGWIN_VERSION_API_MAJOR 0
|
#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
|
/* There is also a compatibity version number associated with the
|
||||||
shared memory regions. It is incremented when incompatible
|
shared memory regions. It is incremented when incompatible
|
||||||
|
@ -236,3 +236,25 @@ errx (int eval, const char *fmt, ...)
|
|||||||
vwarnx (fmt, ap);
|
vwarnx (fmt, ap);
|
||||||
exit (eval);
|
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