missing "const" for libc/unix/getut.c:utmpname

Werner Almesberger almesber@lrc.epfl.ch
Tue Aug 22 07:56:00 GMT 2000


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_____________________/


More information about the Newlib mailing list