Skip to contentSkip to conversation

Add missing header for gcc3

PATCH New Scott McNutt 3 participants 3 messages Sep 23, 2011 – Oct 1, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing header for gcc3

When include/linux/compiler.h is included, the associated gcc3 header is required for older build environments.

---
 include/linux/compiler-gcc3.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/compiler-gcc3.h
include/linux/compiler-gcc3.h new file +21 -0
new file mode 100644
index 0000000..2befe65
@@ -0,0 +1,21 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
+#endif
+
+#if __GNUC_MINOR__ >= 3
+# define __used			__attribute__((__used__))
+#else
+# define __used			__attribute__((__unused__))
+#endif
+
+#if __GNUC_MINOR__ >= 4
+#define __must_check		__attribute__((warn_unused_result))
+#endif
+
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
+#define __always_inline		inline __attribute__((always_inline))
Signature · 1 line
1.6.0.6
#1 lore raw

PATCH 1/1 Add missing header for gcc3

Quoted 2 lines · On Friday, September 23, 2011 17:42:14 Scott McNutt wrote:

When include/linux/compiler.h is included, the associated gcc3 header is required for older build environments.

-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110924/4f5c0352/attachment.pgp

#2 lore raw

PATCH 1/1 Add missing header for gcc3

In reply to Scott McNutt

Dear Scott McNutt,

Quoted 8 lines · In message <[email protected]> you wrote:

When include/linux/compiler.h is included, the associated gcc3 header is required for older build environments.

---
 include/linux/compiler-gcc3.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/compiler-gcc3.h

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never worry about theory as long as  the  machinery  does  what  it's
supposed to do.                                      - R. A. Heinlein