1 /* 2 * Public domain 3 * syslog.h compatibility shim 4 */ 5 module libressl_d.compat.syslog; 6 7 8 private static import core.stdc.stdarg; 9 public import core.sys.posix.syslog; 10 11 extern (C): 12 nothrow @nogc: 13 14 //#if !defined(HAVE_SYSLOG_R) 15 version (Posix) { 16 } else { 17 version (Windows) { 18 /** 19 * informational 20 */ 21 enum LOG_INFO = 6; 22 23 /** 24 * random user-level messages 25 */ 26 enum LOG_USER = 1 << 3; 27 28 /** 29 * reserved for local use 30 */ 31 enum LOG_LOCAL2 = 18 << 3; 32 } 33 34 struct syslog_data 35 { 36 int log_stat; 37 const (char)* log_tag; 38 int log_fac; 39 int log_mask; 40 } 41 42 pragma(inline, true) 43 pure nothrow @trusted @nogc @live 44 .syslog_data SYSLOG_DATA_INIT() 45 46 do 47 { 48 .syslog_data output = 49 { 50 0, 51 cast(const (char)*)(0), 52 .LOG_USER, 53 0xFF, 54 }; 55 56 return output; 57 } 58 59 void syslog_r(int, .syslog_data*, const (char)*, ...); 60 void vsyslog_r(int, .syslog_data*, const (char)*, core.stdc.stdarg.va_list); 61 }