[PATCH] stdlib.h: Add getprogname and setprogname
Corinna Vinschen
vinschen@redhat.com
Mon Nov 17 22:15:00 GMT 2003
Hi,
I've applied the below patch to libc/include/stdlib.h. It adds
getprogname and setprogname declarations if __CYGWIN__ is defined.
Corinna
* libc/include/stdlib.h (getprogname): Declare for Cygwin.
(setprogname): Ditto.
Index: stdlib.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/stdlib.h,v
retrieving revision 1.20
diff -u -p -r1.20 stdlib.h
--- stdlib.h 6 Dec 2002 18:58:50 -0000 1.20
+++ stdlib.h 17 Nov 2003 17:26:57 -0000
@@ -66,6 +66,9 @@ _VOID _EXFUN(exit,(int __status) _ATTRIB
_VOID _EXFUN(free,(_PTR));
char * _EXFUN(getenv,(const char *__string));
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
+#ifdef __CYGWIN__
+const char *_EXFUN(getprogname,(void));
+#endif
char * _EXFUN(_findenv,(_CONST char *, int *));
char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
long _EXFUN(labs,(long));
@@ -90,6 +93,9 @@ char * _EXFUN(mktemp,(char *));
_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
int _EXFUN(rand,(_VOID));
_PTR _EXFUN(realloc,(_PTR __r, size_t __size));
+#ifdef __CYGWIN__
+void _EXFUN(setprogname,(const char *));
+#endif
_VOID _EXFUN(srand,(unsigned __seed));
double _EXFUN(strtod,(const char *__n, char **__end_PTR));
double _EXFUN(_strtod_r,(struct _reent *,const char *__n, char **__end_PTR));
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
More information about the Newlib
mailing list