[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 23/26: Fix build with gcc 5
From: |
Samuel Thibault |
Subject: |
[hurd] 23/26: Fix build with gcc 5 |
Date: |
Tue, 22 Sep 2015 21:51:49 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 172911318104984ddb9f7b4e25a2ee1646228d63
Author: Samuel Thibault <address@hidden>
Date: Tue Sep 22 03:16:13 2015 +0200
Fix build with gcc 5
* libdde_linux26/contrib/include/linux/compiler-gcc5.h: New file, copy of
compiler-gcc4.h with no version test.
* libdde_linux26/contrib/include/linux/inotify.h: Turn extern inline into
static inline.
* libdde_linux26/contrib/include/linux/tty_driver.h: Likewise.
---
.../contrib/include/linux/compiler-gcc5.h | 25 ++++++++++++++++++++++
libdde_linux26/contrib/include/linux/inotify.h | 4 ++--
libdde_linux26/contrib/include/linux/tty_driver.h | 2 +-
3 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc5.h
b/libdde_linux26/contrib/include/linux/compiler-gcc5.h
new file mode 100644
index 0000000..34c5861
--- /dev/null
+++ b/libdde_linux26/contrib/include/linux/compiler-gcc5.h
@@ -0,0 +1,25 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc5.h> directly, include
<linux/compiler.h> instead."
+#endif
+
+#define __used __attribute__((__used__))
+#define __must_check __attribute__((warn_unused_result))
+#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
+#define __always_inline inline __attribute__((always_inline))
+
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
+/* Mark functions as cold. gcc will assume any path leading to a call
+ to them will be unlikely. This means a lot of manual unlikely()s
+ are unnecessary now for any paths leading to the usual suspects
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
+ older compilers]
+
+ gcc also has a __attribute__((__hot__)) to move hot functions into
+ a special section, but I don't see any sense in this right now in
+ the kernel context */
+#define __cold __attribute__((__cold__))
diff --git a/libdde_linux26/contrib/include/linux/inotify.h
b/libdde_linux26/contrib/include/linux/inotify.h
index 37ea289..782fd29 100644
--- a/libdde_linux26/contrib/include/linux/inotify.h
+++ b/libdde_linux26/contrib/include/linux/inotify.h
@@ -230,12 +230,12 @@ static inline void put_inotify_watch(struct inotify_watch
*watch)
{
}
-extern inline int pin_inotify_watch(struct inotify_watch *watch)
+static inline int pin_inotify_watch(struct inotify_watch *watch)
{
return 0;
}
-extern inline void unpin_inotify_watch(struct inotify_watch *watch)
+static inline void unpin_inotify_watch(struct inotify_watch *watch)
{
}
diff --git a/libdde_linux26/contrib/include/linux/tty_driver.h
b/libdde_linux26/contrib/include/linux/tty_driver.h
index 08e0883..8f359e0 100644
--- a/libdde_linux26/contrib/include/linux/tty_driver.h
+++ b/libdde_linux26/contrib/include/linux/tty_driver.h
@@ -310,7 +310,7 @@ extern void tty_set_operations(struct tty_driver *driver,
extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
extern void tty_driver_kref_put(struct tty_driver *driver);
-extern inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
+static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
{
kref_get(&d->kref);
return d;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 16/26: Add devres.c, (continued)
- [hurd] 16/26: Add devres.c, Samuel Thibault, 2015/09/22
- [hurd] 18/26: commit d5a9e24afb4ab38110ebb777588ea0bd0eacbd0a, Samuel Thibault, 2015/09/22
- [hurd] 24/26: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2015/09/22
- [hurd] 08/26: commit 042a53a9e437feaf2230dd2cadcecfae9c7bfe05, Samuel Thibault, 2015/09/22
- [hurd] 22/26: Install missing queue.h, Samuel Thibault, 2015/09/22
- [hurd] 12/26: update pci_ids, Samuel Thibault, 2015/09/22
- [hurd] 17/26: Add pr_cont, Samuel Thibault, 2015/09/22
- [hurd] 26/26: Move files, Samuel Thibault, 2015/09/22
- [hurd] 14/26: update workqueue.h, Samuel Thibault, 2015/09/22
- [hurd] 25/26: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2015/09/22
- [hurd] 23/26: Fix build with gcc 5,
Samuel Thibault <=
- [hurd] 15/26: commit 9d21493b4beb8f918ba248032fefa393074a5e2b, Samuel Thibault, 2015/09/22
- [hurd] 21/26: Fix insecure format, Samuel Thibault, 2015/09/22
- [hurd] 03/26: commit f001fde5eadd915f4858d22ed70d7040f48767cf, Samuel Thibault, 2015/09/22
- [hurd] 06/26: commit 31278e71471399beaff9280737e52b47db4dc345, Samuel Thibault, 2015/09/22
- [hurd] 04/26: commit ccffad25b5136958d4769ed6de5e87992dd9c65c, Samuel Thibault, 2015/09/22
- [hurd] 09/26: Add mdio.h, Samuel Thibault, 2015/09/22
- [hurd] 19/26: Add rcuclassic.c, Samuel Thibault, 2015/09/22
- [hurd] 20/26: really add files, Samuel Thibault, 2015/09/22