chiark / gitweb /
klibc: update to version 1.1.1
authorKay Sievers <kay.sievers@suse.de>
Tue, 6 Sep 2005 20:57:07 +0000 (22:57 +0200)
committerKay Sievers <kay.sievers@suse.de>
Tue, 6 Sep 2005 20:57:07 +0000 (22:57 +0200)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
13 files changed:
klibc/MCONFIG
klibc/include/klibc/compiler.h
klibc/include/klibc/extern.h
klibc/include/malloc.h [new file with mode: 0644]
klibc/include/stdlib.h
klibc/include/string.h
klibc/include/sys/inotify.h [new file with mode: 0644]
klibc/klibc.spec.in
klibc/klibc/SYSCALLS.def
klibc/klibc/execvpe.c
klibc/klibc/strchr.c
klibc/klibc/strrchr.c
klibc/version

index 1141b78d474bed1d9c2361240dd11d1e4ce1b9e0..450e5c7f5c4f4c90df8f60fc98b96cb7db25a502 100644 (file)
@@ -33,7 +33,7 @@ KRNLOBJ = $(SRCROOT)/linux
 KLIBCVER = -D__KLIBC__=$(shell cut -d. -f1 < $(SRCROOT)/version) \
           -D__KLIBC_MINOR__=$(shell cut -d. -f2 < $(SRCROOT)/version)
 
 KLIBCVER = -D__KLIBC__=$(shell cut -d. -f1 < $(SRCROOT)/version) \
           -D__KLIBC_MINOR__=$(shell cut -d. -f2 < $(SRCROOT)/version)
 
-ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/parisc.*/parisc/)
 CC     = $(CROSS)gcc
 LD      = $(CROSS)ld
 KLIBSRC = $(SRCROOT)/klibc
 CC     = $(CROSS)gcc
 LD      = $(CROSS)ld
 KLIBSRC = $(SRCROOT)/klibc
@@ -42,7 +42,7 @@ INCLUDE = -I$(SRCROOT)/include/arch/$(ARCH) \
          -I$(SRCROOT)/include/bits$(BITSIZE) \
          -I$(SRCROOT)/include \
          -I$(KRNLOBJ)/include -I$(KRNLOBJ)/include2 -I$(KRNLSRC)/include
          -I$(SRCROOT)/include/bits$(BITSIZE) \
          -I$(SRCROOT)/include \
          -I$(KRNLOBJ)/include -I$(KRNLOBJ)/include2 -I$(KRNLSRC)/include
-REQFLAGS = $(ARCHREQFLAGS) $(KLIBCVER) -nostdinc -iwithprefix include \
+REQFLAGS = $(ARCHREQFLAGS) $(KLIBCVER) -nostdlib -nostdinc -iwithprefix include \
           $(INCLUDE)
 LDFLAGS =
 AR      = $(CROSS)ar
           $(INCLUDE)
 LDFLAGS =
 AR      = $(CROSS)ar
index ee697adf0832610085fae3c18fe40287bc3e9327..7ff6ff7d51bba208dc96bf3f1904e4fb6b977102 100644 (file)
 # define __bitwise
 #endif
 
 # define __bitwise
 #endif
 
+/* Compiler pragma to make an alias symbol */
+#define __ALIAS(__t, __f, __p, __a) \
+  __t __f __p __attribute__((weak, alias(#__a)));
+
 #endif
 #endif
index f9c34672117a3a1d6c57a80a9773e9c4cd92c669..8a73d1935848a706e4230b9ebb06c5602264d77c 100644 (file)
@@ -11,4 +11,6 @@
 #define __extern extern
 #endif
 
 #define __extern extern
 #endif
 
+#define __alias(x) __attribute__((weak, alias(x)))
+
 #endif /* _KLIBC_EXTERN_H */
 #endif /* _KLIBC_EXTERN_H */
diff --git a/klibc/include/malloc.h b/klibc/include/malloc.h
new file mode 100644 (file)
index 0000000..5beca8d
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * malloc.h
+ *
+ * Apparently people haven't caught on to use <stdlib.h>, which is the
+ * standard place for this crap since the 1980's...
+ */
+
+#ifndef _MALLOC_H
+#define _MALLOC_H
+
+#include <klibc/extern.h>
+#include <klibc/compiler.h>
+#include <stddef.h>
+
+__extern void free(void *);
+
+__extern __mallocfunc void *malloc(size_t);
+__extern __mallocfunc void *calloc(size_t, size_t);
+__extern __mallocfunc void *realloc(void *, size_t);
+
+#endif /* _MALLOC_H */
index 54d45043f77e5348d9b28ab5ad1f96c05d20b565..17efc30e5a5185a44357ac56cfd1acd9acec67ea 100644 (file)
@@ -9,6 +9,8 @@
 #include <klibc/compiler.h>
 #include <stddef.h>
 
 #include <klibc/compiler.h>
 #include <stddef.h>
 
+#include <malloc.h>
+
 #define EXIT_FAILURE 1
 #define EXIT_SUCCESS 0
 
 #define EXIT_FAILURE 1
 #define EXIT_SUCCESS 0
 
@@ -28,7 +30,6 @@ __extern int atoi(const char *);
 __extern long atol(const char *);
 __extern long long atoll(const char *);
 __extern __noreturn exit(int);
 __extern long atol(const char *);
 __extern long long atoll(const char *);
 __extern __noreturn exit(int);
-__extern void free(void *);
 static __inline__ long labs(long __n) {
   return (__n < 0L) ? -__n : __n;
 }
 static __inline__ long labs(long __n) {
   return (__n < 0L) ? -__n : __n;
 }
@@ -37,9 +38,6 @@ static __inline__ long long llabs(long long __n) {
   return (__n < 0LL) ? -__n : __n;
 }
 
   return (__n < 0LL) ? -__n : __n;
 }
 
-__extern __mallocfunc void *malloc(size_t);
-__extern __mallocfunc void *calloc(size_t, size_t);
-__extern __mallocfunc void *realloc(void *, size_t);
 __extern long strtol(const char *, char **, int);
 __extern long long strtoll(const char *, char **, int);
 __extern unsigned long strtoul(const char *, char **, int);
 __extern long strtol(const char *, char **, int);
 __extern long long strtoll(const char *, char **, int);
 __extern unsigned long strtoul(const char *, char **, int);
index 5608a3c963dd1deaafe2c8cd90186f2e1459b0e5..319be4eb853e851dafbab562d5f836ef44abb0fc 100644 (file)
@@ -21,7 +21,9 @@ __extern int strcasecmp(const char *, const char *);
 __extern int strncasecmp(const char *, const char *, size_t);
 __extern char *strcat(char *, const char *);
 __extern char *strchr(const char *, int);
 __extern int strncasecmp(const char *, const char *, size_t);
 __extern char *strcat(char *, const char *);
 __extern char *strchr(const char *, int);
+__extern char *index(const char *, int);
 __extern char *strrchr(const char *, int);
 __extern char *strrchr(const char *, int);
+__extern char *rindex(const char *, int);
 __extern int strcmp(const char *, const char *);
 __extern char *strcpy(char *, const char *);
 __extern size_t strcspn(const char *, const char *);
 __extern int strcmp(const char *, const char *);
 __extern char *strcpy(char *, const char *);
 __extern size_t strcspn(const char *, const char *);
diff --git a/klibc/include/sys/inotify.h b/klibc/include/sys/inotify.h
new file mode 100644 (file)
index 0000000..74fc714
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * sys/inotify.h
+ */
+
+#ifndef _SYS_INOTIFY_H
+#define _SYS_INOTIFY_H
+
+#include <sys/types.h>
+#include <linux/inotify.h>
+#include <klibc/extern.h>
+
+__extern int inotify_init(void);
+__extern int inotify_add_watch(int, const char *, __u32);
+__extern int inotify_rm_watch(int, __u32);
+
+#endif /* _SYS_INOTIFY_H */
index cab496b917fbfe7bcba7a07bfff22ff58394e9cb..eef5dbf9d3c439b5f918608f0b30faebd7a9ba79 100644 (file)
@@ -7,7 +7,7 @@ Group: Development/Libraries
 URL: http://www.zytor.com/mailman/listinfo/klibc
 Source: http://www.kernel.org/pub/linux/libs/klibc-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 URL: http://www.zytor.com/mailman/listinfo/klibc
 Source: http://www.kernel.org/pub/linux/libs/klibc-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-BuildRequires: kernel >= 2.6.0
+BuildRequires: kernel >= 2.6.0, kernel-devel
 Packager: H. Peter Anvin <hpa@zytor.com>
 Prefix: /usr
 Vendor: Starving Linux Artists
 Packager: H. Peter Anvin <hpa@zytor.com>
 Prefix: /usr
 Vendor: Starving Linux Artists
@@ -44,7 +44,7 @@ embedded systems.
 
 %prep
 %setup -q
 
 %prep
 %setup -q
-cp -dRs /lib/modules/`uname -r`/build ./linux
+cp -dRs /lib/modules/`uname -r`/build/ ./linux
 # Shouldn't need this when getting the build tree from /lib/modules
 # make -C linux defconfig ARCH=%{_target_cpu}
 # make -C linux prepare ARCH=%{_target_cpu}
 # Shouldn't need this when getting the build tree from /lib/modules
 # make -C linux defconfig ARCH=%{_target_cpu}
 # make -C linux prepare ARCH=%{_target_cpu}
index 11d8c9a47e8b206116e351e0fa0665e0a5eb4756..b78919b1345763b30edee692f858b387a011576f 100644 (file)
@@ -114,6 +114,9 @@ int lchown32,lchown::lchown(const char *, uid_t, gid_t)
 int getcwd::__getcwd(char *, size_t)
 <?> int utime(const char *, const struct utimbuf *)
 <?> int utimes(const char *, const struct timeval *)
 int getcwd::__getcwd(char *, size_t)
 <?> int utime(const char *, const struct utimbuf *)
 <?> int utimes(const char *, const struct timeval *)
+<?> int inotify_init(void)
+<?> int inotify_add_watch(int, const char *, __u32)
+<?> int inotify_rm_watch(int, __u32)
 
 ;
 ; I/O operations
 
 ;
 ; I/O operations
index afd791ab43faa754981851caae8efc267b3efb0c..fcd5b6fd4a0dd34cae3c2a4119d9b4c423be029c 100644 (file)
@@ -9,7 +9,9 @@
  * Since execlpe() and execvpe() aren't in POSIX, nor in glibc,
  * I have followed QNX precedent in the implementation of the PATH:
  * the PATH that is used is the one in the current environment, not
  * Since execlpe() and execvpe() aren't in POSIX, nor in glibc,
  * I have followed QNX precedent in the implementation of the PATH:
  * the PATH that is used is the one in the current environment, not
- * in the new environment.
+ * in the new environment.  Otherwise it would be impossible to pass
+ * a different PATH to the new process than the one one would want to
+ * use to search.
  */
 
 #include <errno.h>
  */
 
 #include <errno.h>
index 192f83600c0220460cca0774095087a4226cb377..f657095c6bc361743351bce2369cb5654b110cdb 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <string.h>
  */
 
 #include <string.h>
+#include <klibc/compiler.h>
 
 char *strchr(const char *s, int c)
 {
 
 char *strchr(const char *s, int c)
 {
@@ -14,3 +15,5 @@ char *strchr(const char *s, int c)
 
   return (char *)s;
 }
 
   return (char *)s;
 }
+
+__ALIAS(char *, index, (const char *, int), strchr)
index 3b424640592b5c483b37bfc5fce995c98c315ee2..5a0cbe386e320672159e6d3458eaae895467ae44 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <string.h>
  */
 
 #include <string.h>
+#include <klibc/compiler.h>
 
 char *strrchr(const char *s, int c)
 {
 
 char *strrchr(const char *s, int c)
 {
@@ -16,3 +17,5 @@ char *strrchr(const char *s, int c)
 
   return (char *)found;
 }
 
   return (char *)found;
 }
+
+__ALIAS(char *, rindex, (const char *, int), strrchr)
index 5b09c67c2066cc1cf4b56a66f4f9875115b9f4ad..45a1b3f44523206e2b1e6a7ca0e279026c3a2b55 100644 (file)
@@ -1 +1 @@
-1.0.14
+1.1.2