Changeset 989 for vendor/current/lib/util
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- Location:
- vendor/current/lib/util
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/util/attr.h
r988 r989 36 36 37 37 #ifndef _DEPRECATED_ 38 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )38 #ifdef HAVE___ATTRIBUTE__ 39 39 #define _DEPRECATED_ __attribute__ ((deprecated)) 40 40 #else … … 44 44 45 45 #ifndef _WARN_UNUSED_RESULT_ 46 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )46 #ifdef HAVE___ATTRIBUTE__ 47 47 #define _WARN_UNUSED_RESULT_ __attribute__ ((warn_unused_result)) 48 48 #else … … 52 52 53 53 #ifndef _NORETURN_ 54 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )54 #ifdef HAVE___ATTRIBUTE__ 55 55 #define _NORETURN_ __attribute__ ((noreturn)) 56 56 #else … … 60 60 61 61 #ifndef _PURE_ 62 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)62 #ifdef HAVE___ATTRIBUTE__ 63 63 #define _PURE_ __attribute__((pure)) 64 64 #else … … 68 68 69 69 #ifndef NONNULL 70 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)70 #ifdef HAVE___ATTRIBUTE__ 71 71 #define NONNULL(param) param __attribute__((nonnull)) 72 72 #else … … 76 76 77 77 #ifndef PRINTF_ATTRIBUTE 78 #if __GNUC__ >= 378 #ifdef HAVE___ATTRIBUTE__ 79 79 /** Use gcc attribute to check printf fns. a1 is the 1-based index of 80 80 * the parameter containing the format, and a2 the index of the first … … 88 88 89 89 #ifndef FORMAT_ATTRIBUTE 90 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)90 #ifdef HAVE___ATTRIBUTE__ 91 91 /** Use gcc attribute to check printf fns. a1 is argument to format() 92 92 * in the above macro. This is needed to support Heimdal's printf 93 93 * decorations. Note that some gcc 2.x versions don't handle this 94 * properly , and as such I've used the same minimum from heimdal: GCC 3.1**/94 * properly. **/ 95 95 #define FORMAT_ATTRIBUTE(a) __attribute__ ((format a)) 96 96 #else -
vendor/current/lib/util/become_daemon.c
r988 r989 25 25 #include "system/filesys.h" 26 26 #include "system/locale.h" 27 #if HAVE_LIBSYSTEMD_DAEMON27 #if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) 28 28 #include <systemd/sd-daemon.h> 29 29 #endif … … 70 70 newpid = fork(); 71 71 if (newpid) { 72 #if HAVE_LIBSYSTEMD_DAEMON72 #if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) 73 73 sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid); 74 74 #endif /* HAVE_LIBSYSTEMD_DAEMON */ … … 99 99 _PUBLIC_ void exit_daemon(const char *msg, int error) 100 100 { 101 #if def HAVE_LIBSYSTEMD_DAEMON101 #if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) 102 102 if (msg == NULL) { 103 103 msg = strerror(error); … … 118 118 name = "Samba"; 119 119 } 120 #if def HAVE_LIBSYSTEMD_DAEMON120 #if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) 121 121 sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name); 122 122 #endif … … 130 130 name = "Samba"; 131 131 } 132 #if def HAVE_LIBSYSTEMD_DAEMON132 #if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) 133 133 sd_notifyf(0, "\nSTATUS=%s: %s", name, msg); 134 134 #endif -
vendor/current/lib/util/debug.c
r988 r989 103 103 }; 104 104 105 #if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL) 105 #if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL) || defined(HAVE_LIBSYSTEMD) 106 106 static int debug_level_to_priority(int level) 107 107 { … … 180 180 #endif /* WITH_SYSLOG */ 181 181 182 #if def HAVE_LIBSYSTEMD_JOURNAL182 #if defined(HAVE_LIBSYSTEMD_JOURNAL) || defined(HAVE_LIBSYSTEMD) 183 183 #include <systemd/sd-journal.h> 184 184 static void debug_systemd_log(int msg_level, … … 252 252 #endif 253 253 254 #if def HAVE_LIBSYSTEMD_JOURNAL254 #if defined(HAVE_LIBSYSTEMD_JOURNAL) || defined(HAVE_LIBSYSTEMD) 255 255 { 256 256 .name = "systemd", -
vendor/current/lib/util/wscript_build
r988 r989 70 70 local_include=False) 71 71 72 bld.SAMBA_LIBRARY('tevent-unix-util', 73 source='tevent_unix.c', 74 local_include=False, 75 deps='tevent', 76 public_headers='tevent_unix.h', 77 header_path=[ ('*', 'util') ], 78 pc_files=[], 79 vnum='0.0.1') 72 if bld.env.SAMBA_UTIL_CORE_ONLY: 80 73 81 if not bld.env.SAMBA_UTIL_CORE_ONLY: 74 bld.SAMBA_LIBRARY('tevent-util', 75 source='tevent_unix.c', 76 local_include=False, 77 deps='tevent', 78 private_library=True) 79 80 else: 82 81 83 82 bld.env.public_headers_skip.append('charset_compat.h') … … 142 141 143 142 bld.SAMBA_LIBRARY('tevent-util', 144 source='tevent_ ntstatus.c tevent_werror.c',143 source='tevent_unix.c tevent_ntstatus.c tevent_werror.c', 145 144 local_include=False, 146 public_deps='tevent samba-errors tevent-unix-util',147 public_headers='tevent_ntstatus.h tevent_ werror.h',145 public_deps='tevent samba-errors', 146 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h', 148 147 header_path=[ ('*', 'util') ], 149 148 pc_files=[],
Note:
See TracChangeset
for help on using the changeset viewer.