[klibc] [git patch] minor fixes

maximilian attems max at stro.at
Mon Sep 3 14:53:04 PDT 2007


hello hpa,

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

with the following shortlog:
maximilian attems (8):
      [klibc] grp.h: Add declaration of getgrgid(), getgrnam()
      [klibc] getgrgid, getgrnam include grp.h
      [klibc] getpwnam, getpwuid include pwd.h
      [klibc] ctype.h declare char classification functions
      [klibc] do_mounts_md.c include kinit.h
      [klibc] strtotimex include time.h
      [klibc] add some specific .gitignore
      [klibc] qsort, sleep, strntoumax, strtox, usleep include stdlib.h


and diffstat
 klcc/.gitignore              |    2 ++
 scripts/basic/.gitignore     |    1 +
 usr/include/ctype.h          |   16 ++++++++++++++++
 usr/include/grp.h            |    2 ++
 usr/include/klibc/.gitignore |    1 +
 usr/kinit/do_mounts_md.c     |    1 +
 usr/klibc/qsort.c            |    1 +
 usr/klibc/sleep.c            |    1 +
 usr/klibc/strntoumax.c       |    1 +
 usr/klibc/strtotimex.c       |    1 +
 usr/klibc/strtox.c           |    1 +
 usr/klibc/userdb/getgrgid.c  |    2 ++
 usr/klibc/userdb/getgrnam.c  |    2 ++
 usr/klibc/userdb/getpwnam.c  |    2 ++
 usr/klibc/userdb/getpwuid.c  |    2 ++
 usr/klibc/usleep.c           |    1 +
 16 files changed, 37 insertions(+), 0 deletions(-)
 create mode 100644 klcc/.gitignore
 create mode 100644 scripts/basic/.gitignore
 create mode 100644 usr/include/klibc/.gitignore

-- 
maks


commit 327eb168ff4bedd40d9f77e8dcf465df4eede7ba
Author: maximilian attems <max at stro.at>
Date:   Mon Aug 27 01:37:00 2007 +0200

    [klibc] qsort, sleep, strntoumax, strtox, usleep include stdlib.h
    
    include the header file that prototypes their function.
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/klibc/qsort.c b/usr/klibc/qsort.c
index 73484a2..4c189fc 100644
--- a/usr/klibc/qsort.c
+++ b/usr/klibc/qsort.c
@@ -6,6 +6,7 @@
  */
 
 #include <stddef.h>
+#include <stdlib.h>
 #include <string.h>
 
 static inline size_t newgap(size_t gap)
diff --git a/usr/klibc/sleep.c b/usr/klibc/sleep.c
index 750c51d..bd6b5bc 100644
--- a/usr/klibc/sleep.c
+++ b/usr/klibc/sleep.c
@@ -3,6 +3,7 @@
  */
 
 #include <errno.h>
+#include <stdlib.h>
 #include <time.h>
 
 unsigned int sleep(unsigned int seconds)
diff --git a/usr/klibc/strntoumax.c b/usr/klibc/strntoumax.c
index 3440967..56dddad 100644
--- a/usr/klibc/strntoumax.c
+++ b/usr/klibc/strntoumax.c
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <ctype.h>
+#include <inttypes.h>
 
 static inline int digitval(int ch)
 {
diff --git a/usr/klibc/strtox.c b/usr/klibc/strtox.c
index 54bdefc..c22e7c7 100644
--- a/usr/klibc/strtox.c
+++ b/usr/klibc/strtox.c
@@ -5,6 +5,7 @@
  */
 
 #include <stddef.h>
+#include <stdlib.h>
 #include <inttypes.h>
 
 TYPE NAME(const char *nptr, char **endptr, int base)
diff --git a/usr/klibc/usleep.c b/usr/klibc/usleep.c
index 93bfabe..af7054b 100644
--- a/usr/klibc/usleep.c
+++ b/usr/klibc/usleep.c
@@ -3,6 +3,7 @@
  */
 
 #include <errno.h>
+#include <stdlib.h>
 #include <time.h>
 
 void usleep(unsigned long usec)

commit 0f58fae3376824c71eda8b2ff01f6a54bda6b224
Author: maximilian attems <max at stro.at>
Date:   Mon Aug 27 01:23:46 2007 +0200

    [klibc] add some specific .gitignore
    
    specific subdir gitignores for autognerated
    * klcc
    * fixdep
    * havesyscall.h
    
    git status now only has the untracked shared static dir lines left.
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/klcc/.gitignore b/klcc/.gitignore
new file mode 100644
index 0000000..b331920
--- /dev/null
+++ b/klcc/.gitignore
@@ -0,0 +1,2 @@
+klcc
+klibc.config
diff --git a/scripts/basic/.gitignore b/scripts/basic/.gitignore
new file mode 100644
index 0000000..a776371
--- /dev/null
+++ b/scripts/basic/.gitignore
@@ -0,0 +1 @@
+fixdep
diff --git a/usr/include/klibc/.gitignore b/usr/include/klibc/.gitignore
new file mode 100644
index 0000000..8246d7f
--- /dev/null
+++ b/usr/include/klibc/.gitignore
@@ -0,0 +1 @@
+havesyscall.h

commit 758eb58e02b710216217802893b4922d70eb046a
Author: maximilian attems <max at stro.at>
Date:   Sun Aug 26 20:40:10 2007 +0200

    [klibc] strtotimex include time.h
    
    include header file that prototypes it's functions.
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/klibc/strtotimex.c b/usr/klibc/strtotimex.c
index 7f59a4f..0624082 100644
--- a/usr/klibc/strtotimex.c
+++ b/usr/klibc/strtotimex.c
@@ -10,6 +10,7 @@
 #include <ctype.h>
 #include <inttypes.h>
 #include <stdlib.h>
+#include <time.h>
 #include <sys/time.h>
 
 char *NAME(const char *str, TIMEX * ts)

commit b98499e521023e9d4239ef87a794e99ef37643bb
Author: maximilian attems <max at stro.at>
Date:   Sun Aug 26 20:37:39 2007 +0200

    [klibc] do_mounts_md.c include kinit.h
    
    kinit.h has the prototype for md_run()
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/kinit/do_mounts_md.c b/usr/kinit/do_mounts_md.c
index 6d4facc..e5bbe21 100644
--- a/usr/kinit/do_mounts_md.c
+++ b/usr/kinit/do_mounts_md.c
@@ -20,6 +20,7 @@
 #include <sys/md.h>
 #include <linux/major.h>
 
+#include "kinit.h"
 #include "do_mounts.h"
 
 #define  LEVEL_NONE              (-1000000)

commit 0ca917d9b9b95c77f299d4093014c7c3872b86f5
Author: maximilian attems <max at stro.at>
Date:   Sun Aug 26 20:26:54 2007 +0200

    [klibc] ctype.h declare char classification functions
    
    udev uses -Wmissing-declarations,
    fixes those warnings:
    usr/klibc/../include/ctype.h:125: warning: no previous prototype for 'isalnum'
    usr/klibc/../include/ctype.h:126: warning: no previous prototype for 'isalpha'
    usr/klibc/../include/ctype.h:127: warning: no previous prototype for 'isascii'
    usr/klibc/../include/ctype.h:128: warning: no previous prototype for 'isblank'
    usr/klibc/../include/ctype.h:129: warning: no previous prototype for 'iscntrl'
    usr/klibc/../include/ctype.h:130: warning: no previous prototype for 'isdigit'
    usr/klibc/../include/ctype.h:131: warning: no previous prototype for 'isgraph'
    usr/klibc/../include/ctype.h:132: warning: no previous prototype for 'islower'
    usr/klibc/../include/ctype.h:133: warning: no previous prototype for 'isprint'
    usr/klibc/../include/ctype.h:134: warning: no previous prototype for 'ispunct'
    usr/klibc/../include/ctype.h:135: warning: no previous prototype for 'isspace'
    usr/klibc/../include/ctype.h:136: warning: no previous prototype for 'isupper'
    usr/klibc/../include/ctype.h:137: warning: no previous prototype for 'isxdigit'
    usr/klibc/../include/ctype.h:138: warning: no previous prototype for 'toupper'
    usr/klibc/../include/ctype.h:139: warning: no previous prototype for 'tolower'
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/include/ctype.h b/usr/include/ctype.h
index 670aec9..b205489 100644
--- a/usr/include/ctype.h
+++ b/usr/include/ctype.h
@@ -28,6 +28,22 @@ enum {
 	__ctype_cntrl = (1 << 7),
 };
 
+__extern int isalnum(int);
+__extern int isalpha(int);
+__extern int isascii(int);
+__extern int isblank(int);
+__extern int iscntrl(int);
+__extern int isdigit(int);
+__extern int isgraph(int);
+__extern int islower(int);
+__extern int isprint(int);
+__extern int ispunct(int);
+__extern int isspace(int);
+__extern int isupper(int);
+__extern int isxdigit(int);
+__extern int toupper(int);
+__extern int tolower(int);
+
 extern const unsigned char __ctypes[];
 
 static inline int __ctype_isalnum(int __c)

commit a34e25fa8f4578340ea8b46d0b6511d47e6cc04e
Author: maximilian attems <max at stro.at>
Date:   Sun Aug 26 19:53:49 2007 +0200

    [klibc] getpwnam, getpwuid include pwd.h
    
    include the header file that prototype their function.
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/klibc/userdb/getpwnam.c b/usr/klibc/userdb/getpwnam.c
index ae1359c..3a95688 100644
--- a/usr/klibc/userdb/getpwnam.c
+++ b/usr/klibc/userdb/getpwnam.c
@@ -4,6 +4,8 @@
  * Dummy getpwnam() to support udev
  */
 
+#include <pwd.h>
+
 #include "userdb.h"
 
 
diff --git a/usr/klibc/userdb/getpwuid.c b/usr/klibc/userdb/getpwuid.c
index f924f29..cbe706a 100644
--- a/usr/klibc/userdb/getpwuid.c
+++ b/usr/klibc/userdb/getpwuid.c
@@ -4,6 +4,8 @@
  * Dummy getpwuid() to support udev
  */
 
+#include <pwd.h>
+
 #include "userdb.h"
 
 

commit 39c9bd159f3b8b1296474082e3bf836e1922a3b4
Author: maximilian attems <max at stro.at>
Date:   Sun Aug 26 19:51:44 2007 +0200

    [klibc] getgrgid, getgrnam include grp.h
    
    include the header file that prototype their function.
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/klibc/userdb/getgrgid.c b/usr/klibc/userdb/getgrgid.c
index 5e13a47..549aec3 100644
--- a/usr/klibc/userdb/getgrgid.c
+++ b/usr/klibc/userdb/getgrgid.c
@@ -4,6 +4,8 @@
  * Dummy getgrgid() to support udev
  */
 
+#include <grp.h>
+
 #include "userdb.h"
 
 struct group *getgrgid(gid_t gid)
diff --git a/usr/klibc/userdb/getgrnam.c b/usr/klibc/userdb/getgrnam.c
index 8df7b8f..ac184bc 100644
--- a/usr/klibc/userdb/getgrnam.c
+++ b/usr/klibc/userdb/getgrnam.c
@@ -4,6 +4,8 @@
  * Dummy getgrnam() to support udev
  */
 
+#include <grp.h>
+
 #include "userdb.h"
 
 struct group *getgrnam(const char *name)

commit 022bb4741bddc86dc450ca6697edba37192ed9e9
Author: maximilian attems <max at stro.at>
Date:   Sun Aug 26 19:50:53 2007 +0200

    [klibc] grp.h: Add declaration of getgrgid(), getgrnam()
    
    userdb dir has the dummy functions themself, allow usage.
    
    Signed-off-by: maximilian attems <max at stro.at>

diff --git a/usr/include/grp.h b/usr/include/grp.h
index 88bf79e..77ce399 100644
--- a/usr/include/grp.h
+++ b/usr/include/grp.h
@@ -16,5 +16,7 @@ struct group {
 };
 
 __extern int setgroups(size_t, const gid_t *);
+__extern struct group *getgrgid(gid_t);
+__extern struct group *getgrnam(const char *);
 
 #endif				/* _GRP_H */



More information about the klibc mailing list