summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-09-27 05:24:26 +0000
committerEric Andersen <andersen@codepoet.org>2001-09-27 05:24:26 +0000
commit2512c847453c24b928c34beed88902fbb6877b7a (patch)
tree3d327c54c00684b85c435cffa29c5050888c0a69 /libc/misc
parente83a36ce9f97ac0f59117b3a62fd2dd8461b1fd5 (diff)
Update to accomodate the header file changes
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/lsearch/lsearch.c2
-rw-r--r--libc/misc/mntent/mntent.c2
-rw-r--r--libc/misc/sysvipc/ftok.c2
-rw-r--r--libc/misc/sysvipc/shm.c1
-rw-r--r--libc/misc/time/ctime.c1
-rw-r--r--libc/misc/time/ctime_r.c1
-rw-r--r--libc/misc/time/localtime.c1
-rw-r--r--libc/misc/time/localtime_r.c1
-rw-r--r--libc/misc/time/utimes.c5
-rw-r--r--libc/misc/utmp/utent.c12
10 files changed, 18 insertions, 10 deletions
diff --git a/libc/misc/lsearch/lsearch.c b/libc/misc/lsearch/lsearch.c
index aed4b1e7d..ace739211 100644
--- a/libc/misc/lsearch/lsearch.c
+++ b/libc/misc/lsearch/lsearch.c
@@ -8,6 +8,7 @@
* "It's not reality that's important, but how you perceive things."
*/
+#include <string.h>
#include <stdio.h>
char *lfind(key, base, num, size, cmp)
@@ -33,7 +34,6 @@ register unsigned int size;
int (*cmp) ();
{
register char *p;
- char *memcpy();
if ((p = lfind(key, base, num, size, cmp)) == NULL) {
p = memcpy((base + (size * (*num))), key, size);
diff --git a/libc/misc/mntent/mntent.c b/libc/misc/mntent/mntent.c
index 2bdd3c7a6..9e8fda613 100644
--- a/libc/misc/mntent/mntent.c
+++ b/libc/misc/mntent/mntent.c
@@ -8,7 +8,7 @@
struct mntent *getmntent(FILE * filep)
{
char *cp, *sep = " \t\n";
- static char buff[MNTMAXSTR];
+ static char buff[BUFSIZ];
static struct mntent mnt;
/* Loop on the file, skipping comment lines. - FvK 03/07/93 */
diff --git a/libc/misc/sysvipc/ftok.c b/libc/misc/sysvipc/ftok.c
index 06843edda..b0199acda 100644
--- a/libc/misc/sysvipc/ftok.c
+++ b/libc/misc/sysvipc/ftok.c
@@ -28,7 +28,7 @@ ftok (pathname, proj_id)
struct stat st;
key_t key;
- if (_xstat (_STAT_VER, pathname, &st) < 0)
+ if (__xstat (_STAT_VER, pathname, &st) < 0)
return (key_t) -1;
key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16)
diff --git a/libc/misc/sysvipc/shm.c b/libc/misc/sysvipc/shm.c
index 5fdfe6ca7..c916993d0 100644
--- a/libc/misc/sysvipc/shm.c
+++ b/libc/misc/sysvipc/shm.c
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <stdlib.h>
#include <errno.h>
#include <sys/shm.h>
#include "ipc.h"
diff --git a/libc/misc/time/ctime.c b/libc/misc/time/ctime.c
index ddcde6111..8783d284e 100644
--- a/libc/misc/time/ctime.c
+++ b/libc/misc/time/ctime.c
@@ -1,5 +1,6 @@
#include <time.h>
+#include <sys/time.h>
extern void __tm_conv();
extern void __asctime();
diff --git a/libc/misc/time/ctime_r.c b/libc/misc/time/ctime_r.c
index 85677b681..b608098ae 100644
--- a/libc/misc/time/ctime_r.c
+++ b/libc/misc/time/ctime_r.c
@@ -1,5 +1,6 @@
#include <time.h>
+#include <sys/time.h>
extern void __tm_conv();
extern void __asctime();
diff --git a/libc/misc/time/localtime.c b/libc/misc/time/localtime.c
index 1f538ab7a..bedbb8ea7 100644
--- a/libc/misc/time/localtime.c
+++ b/libc/misc/time/localtime.c
@@ -1,5 +1,6 @@
#include <time.h>
+#include <sys/time.h>
extern void __tm_conv();
diff --git a/libc/misc/time/localtime_r.c b/libc/misc/time/localtime_r.c
index d084f2b1e..139864506 100644
--- a/libc/misc/time/localtime_r.c
+++ b/libc/misc/time/localtime_r.c
@@ -1,5 +1,6 @@
#include <time.h>
+#include <sys/time.h>
extern void __tm_conv();
diff --git a/libc/misc/time/utimes.c b/libc/misc/time/utimes.c
index 364bf83e7..86dff6bea 100644
--- a/libc/misc/time/utimes.c
+++ b/libc/misc/time/utimes.c
@@ -1,7 +1,8 @@
+#include <stdlib.h>
#include <utime.h>
#include <sys/time.h>
-int utimes(const char *path, struct timeval tvp[2])
+int utimes (const char *file, const struct timeval tvp[2])
{
struct utimbuf buf, *times;
@@ -12,5 +13,5 @@ int utimes(const char *path, struct timeval tvp[2])
}
else
times = NULL;
- return utime(path, times);
+ return utime(file, times);
}
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c
index f9d098fb3..220bd6db6 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -7,6 +7,7 @@
have to call endutent() to close the file even if you've not called
setutent -- getutid and family use the same file descriptor. */
+#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <paths.h>
@@ -53,7 +54,7 @@ struct utmp *getutent(void)
return __getutent(ut_fd);
}
-struct utmp *getutid(struct utmp *utmp_entry)
+struct utmp *getutid (const struct utmp *utmp_entry)
{
struct utmp *utmp;
@@ -78,7 +79,7 @@ struct utmp *getutid(struct utmp *utmp_entry)
return NULL;
}
-struct utmp *getutline(struct utmp *utmp_entry)
+struct utmp *getutline(const struct utmp *utmp_entry)
{
struct utmp *utmp;
@@ -102,7 +103,7 @@ struct utmp *getutline(struct utmp *utmp_entry)
return NULL;
}
-struct utmp *pututline(struct utmp *utmp_entry)
+struct utmp *pututline (const struct utmp *utmp_entry)
{
struct utmp *ut;
@@ -122,14 +123,15 @@ struct utmp *pututline(struct utmp *utmp_entry)
return NULL;
}
- return utmp_entry;
+ return (struct utmp *)utmp_entry;
}
-void utmpname(const char *new_ut_name)
+int utmpname (const char *new_ut_name)
{
if (new_ut_name != NULL)
ut_name = new_ut_name;
if (ut_fd != -1)
close(ut_fd);
+ return 0;
}