summaryrefslogtreecommitdiff
path: root/klibc
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-02-12 22:41:55 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:27 -0700
commit5a98bc58e429bd6f4b1da10ef965d8b3f130fbe9 (patch)
treeb73dc29e95df8baa7bae8c6acce0f76dcdd402f2 /klibc
parenteb10f97f2816ae09f949060a2bb8c46b8c1788ed (diff)
[PATCH] update klibc to version .107
Diffstat (limited to 'klibc')
-rw-r--r--klibc/klibc/include/endian.h1
-rw-r--r--klibc/klibc/include/klibc/compiler.h34
-rw-r--r--klibc/version2
3 files changed, 36 insertions, 1 deletions
diff --git a/klibc/klibc/include/endian.h b/klibc/klibc/include/endian.h
index 10dbbd8a89..44f89ccbbc 100644
--- a/klibc/klibc/include/endian.h
+++ b/klibc/klibc/include/endian.h
@@ -5,6 +5,7 @@
#ifndef _ENDIAN_H
#define _ENDIAN_H
+#include <klibc/compiler.h>
#include <asm/byteorder.h>
/* Linux' asm/byteorder.h defines either __LITTLE_ENDIAN or
diff --git a/klibc/klibc/include/klibc/compiler.h b/klibc/klibc/include/klibc/compiler.h
index 64b8c54158..49872b89d4 100644
--- a/klibc/klibc/include/klibc/compiler.h
+++ b/klibc/klibc/include/klibc/compiler.h
@@ -65,4 +65,38 @@
# define __unusedfunc
#endif
+/* "pure" function:
+
+ Many functions have no effects except the return value and their
+ return value depends only on the parameters and/or global
+ variables. Such a function can be subject to common subexpression
+ elimination and loop optimization just as an arithmetic operator
+ would be. These functions should be declared with the attribute
+ `pure'.
+*/
+#ifdef __GNUC__
+# define __attribute_pure__ __attribute__((pure))
+#else
+# define __attribute_pure__
+#endif
+
+/* "const" function:
+
+ Many functions do not examine any values except their arguments,
+ and have no effects except the return value. Basically this is
+ just slightly more strict class than the `pure' attribute above,
+ since function is not allowed to read global memory.
+
+ Note that a function that has pointer arguments and examines the
+ data pointed to must _not_ be declared `const'. Likewise, a
+ function that calls a non-`const' function usually must not be
+ `const'. It does not make sense for a `const' function to return
+ `void'.
+*/
+#ifdef __GNUC__
+# define __attribute_const__ __attribute__((const))
+#else
+# define __attribute_const__
+#endif
+
#endif
diff --git a/klibc/version b/klibc/version
index f14cf6a1e0..4b0a18ac52 100644
--- a/klibc/version
+++ b/klibc/version
@@ -1 +1 @@
-0.107
+0.108