This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
missing "const" for libc/unix/getut.c:utmpname
- To: newlib at sources dot redhat dot com
- Subject: missing "const" for libc/unix/getut.c:utmpname
- From: Werner Almesberger <almesber at lrc dot epfl dot ch>
- Date: Tue, 22 Aug 2000 16:56:25 +0200 (MET DST)
libc/sys/cygwin/sys/utmp.h:extern void utmpname (const char *);
but
libc/unix/getut.c:utmpname (char *file)
I think there should be at least a _CONST in getut.c.
- Werner
---------------------------------- cut here -----------------------------------
--- orig/newlib/libc/unix/getut.c Mon Aug 21 07:02:30 2000
+++ src/newlib/libc/unix/getut.c Tue Aug 22 14:57:23 2000
@@ -2,6 +2,7 @@
#include <unistd.h>
#include <utmp.h>
#include <_syslist.h>
+#include <_ansi.h>
static int utmp_fd = -2;
static char *utmp_file = UTMP_FILE;
@@ -26,7 +27,7 @@
}
void
-utmpname (char *file)
+utmpname (_CONST char *file)
{
extern char *strdup (char *);
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH werner.almesberger@ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/