[klibc] [git patch] minor fixes

maximilian attems max at stro.at
Tue Sep 4 00:20:11 PDT 2007


On Mon, 03 Sep 2007, maximilian attems wrote:

> have been sitting too long on them, nothing exciting, please pull:
> git pull git://brane.itp.tuwien.ac.at/~mattems/klibc.git maks
> 

some more stuff along the road added:

maximilian attems (5):
      [klibc] unistd.h declare nice()
      [klibc] getintfile.c, readfile.c include kinit.h
      [klibc] kinit/ last missing includes
      [klibc] sleep.c, usleep.c include unistd.h
      [klibc] uname.c declare functions as static

 include/unistd.h           |    1 +
 kinit/getintfile.c         |    2 ++
 kinit/nfsmount/dummypmap.c |    1 +
 kinit/readfile.c           |    2 ++
 kinit/xpio.c               |    2 ++
 klibc/sleep.c              |    1 +
 klibc/usleep.c             |    1 +
 utils/uname.c              |    4 ++--
 8 files changed, 12 insertions(+), 2 deletions(-)

-- 
maks

commit d433b32da32b42d82d022f1c01eb0475b226f2df
Author: maximilian attems <max at stro.at>
Date:   Tue Sep 4 01:02:20 2007 +0200

    [klibc] uname.c declare functions as static
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/utils/uname.c b/usr/utils/uname.c
index 88aedb9..704e385 100644
--- a/usr/utils/uname.c
+++ b/usr/utils/uname.c
@@ -28,7 +28,7 @@ enum uname_fields {
 	UN_NR_FIELDS
 };
 
-void usage(FILE * stream, const char *progname)
+static void usage(FILE * stream, const char *progname)
 {
 	fprintf(stream,
 		"Usage: %s [OPTION] . . .\n"
@@ -49,7 +49,7 @@ void usage(FILE * stream, const char *progname)
 		"\n" "  -h   help/usage\n" "\n", progname);
 }
 
-char *make_hardware(const char *machine)
+static char *make_hardware(const char *machine)
 {
 	char *hardware;
 

commit 307ae198489b18be98c15c6b21c9c5064c58f96d
Author: maximilian attems <max at stro.at>
Date:   Tue Sep 4 00:59:03 2007 +0200

    [klibc] sleep.c, usleep.c include unistd.h
    
    unistd.h features their function declarations.
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/klibc/sleep.c b/usr/klibc/sleep.c
index 750c51d..cb712b2 100644
--- a/usr/klibc/sleep.c
+++ b/usr/klibc/sleep.c
@@ -4,6 +4,7 @@
 
 #include <errno.h>
 #include <time.h>
+#include <unistd.h>
 
 unsigned int sleep(unsigned int seconds)
 {
diff --git a/usr/klibc/usleep.c b/usr/klibc/usleep.c
index 93bfabe..e5d3c61 100644
--- a/usr/klibc/usleep.c
+++ b/usr/klibc/usleep.c
@@ -4,6 +4,7 @@
 
 #include <errno.h>
 #include <time.h>
+#include <unistd.h>
 
 void usleep(unsigned long usec)
 {

commit e15220a54e5947a70c6bee6f9b372ce731b1bd80
Author: maximilian attems <max at stro.at>
Date:   Tue Sep 4 00:58:08 2007 +0200

    [klibc] kinit/ last missing includes
    
    dummymap.c include dummymap.h
    xpio.c include xpio.h
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/kinit/nfsmount/dummypmap.c b/usr/kinit/nfsmount/dummypmap.c
index 5ee2406..d403631 100644
--- a/usr/kinit/nfsmount/dummypmap.c
+++ b/usr/kinit/nfsmount/dummypmap.c
@@ -15,6 +15,7 @@
 #include <string.h>
 #include <sys/socket.h>
 
+#include "dummypmap.h"
 #include "sunrpc.h"
 
 extern const char *progname;
diff --git a/usr/kinit/xpio.c b/usr/kinit/xpio.c
index 9373f7c..42a9844 100644
--- a/usr/kinit/xpio.c
+++ b/usr/kinit/xpio.c
@@ -6,6 +6,8 @@
 #include <unistd.h>
 #include <errno.h>
 
+#include "xpio.h"
+
 ssize_t xpread(int fd, void *buf, size_t count, off_t offset)
 {
 	ssize_t ctr = 0;

commit ab70607e244b140efa60648f3d56a14869498c60
Author: maximilian attems <max at stro.at>
Date:   Tue Sep 4 00:55:22 2007 +0200

    [klibc] getintfile.c, readfile.c include kinit.h
    
    their prototypes are defined in kinit.h
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/kinit/getintfile.c b/usr/kinit/getintfile.c
index 8cb94bb..41ba475 100644
--- a/usr/kinit/getintfile.c
+++ b/usr/kinit/getintfile.c
@@ -6,6 +6,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "kinit.h"
+
 int getintfile(const char *path, long *val)
 {
 	char buffer[64];
diff --git a/usr/kinit/readfile.c b/usr/kinit/readfile.c
index 28f854f..7a16b4a 100644
--- a/usr/kinit/readfile.c
+++ b/usr/kinit/readfile.c
@@ -11,6 +11,8 @@
 #include <errno.h>
 #include <sys/stat.h>
 
+#include "kinit.h"
+
 ssize_t freadfile(FILE *f, char **pp)
 {
 	size_t bs;		/* Decent starting point... */

commit 4c46f7acdbc46249d18bbad141e86f6118c02a0e
Author: maximilian attems <max at stro.at>
Date:   Tue Sep 4 00:54:00 2007 +0200

    [klibc] unistd.h declare nice()
    
    function defined in nice.c
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/include/unistd.h b/usr/include/unistd.h
index 5a84a0f..547e717 100644
--- a/usr/include/unistd.h
+++ b/usr/include/unistd.h
@@ -33,6 +33,7 @@ __extern int execlp(const char *, const char *, ...);
 __extern int execle(const char *, const char *, ...);
 __extern int execlpe(const char *, const char *, ...);
 
+__extern int nice(int);
 __extern int setuid(uid_t);
 __extern uid_t getuid(void);
 __extern int seteuid(uid_t);



More information about the klibc mailing list