]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/ldpreload.h
update copyright year
[coloredstderr/coloredstderr.git] / src / ldpreload.h
index 57f923b22e5dab013401a7e9f2ea1477daa85236..af416b39dd9f4c4ef23611410d0a1a951965d1c4 100644 (file)
@@ -2,7 +2,7 @@
  * Helper header for LD_PRELOAD related headers macros. Must be loaded _first_
  * (for RTLD_NEXT)!
  *
- * Copyright (C) 2012-2013  Simon Ruderich
+ * Copyright (C) 2012-2015  Simon Ruderich
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include <dlfcn.h>
 #include <errno.h>
 
-static void *dlsym_function(char const *name)
-#ifdef HAVE___ATTRIBUTE__
-                                              __attribute__((noinline))
-#endif
-;
-
+static void *dlsym_function(char const *name) noinline;
 /* Load the function name using dlsym() and return it. Terminate program on
  * failure. Split in function and macro to reduce code inserted into the
  * function using the macro. */
@@ -58,7 +53,7 @@ static void *dlsym_function(char const *name) {
 }
 
 #define DLSYM_FUNCTION(pointer, name) \
-    if (!(pointer)) { \
+    if (unlikely(!(pointer))) { \
         *(void **) (&(pointer)) = dlsym_function(name); \
     }