Andrzej Kurek | 4226dec | 2018-01-23 05:51:11 -0500 | [diff] [blame] | 1 | #include <dlfcn.h> |
| 2 | #include <stdarg.h> |
| 3 | #include <stdio.h> |
| 4 | #include <stdlib.h> |
| 5 | #include <string.h> |
| 6 | #include <syslog.h> |
| 7 | |
| 8 | |
| 9 | void openlog( const char *ident, int option, int facility ) |
| 10 | { |
| 11 | (void) ident; |
| 12 | (void) option; |
| 13 | (void) facility; |
| 14 | } |
| 15 | |
| 16 | /* POSIX API */ |
| 17 | void syslog( int priority, const char *format, ... ) |
| 18 | { |
| 19 | va_list args; |
| 20 | va_start( args, format ); |
| 21 | vfprintf( stderr, format, args ); |
| 22 | va_end( args ); |
| 23 | } |
| 24 | |
| 25 | /* Linux ABI |
| 26 | * http://refspecs.linux-foundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---syslog-chk-1.html |
| 27 | */ |
| 28 | void __syslog_chk( int priority, int flag, const char *format, ... ) |
| 29 | { |
| 30 | va_list args; |
| 31 | (int) flag; |
| 32 | va_start( args, format ); |
| 33 | vfprintf( stderr, format, args ); |
| 34 | fputc( '\n', stderr ); |
| 35 | va_end( args ); |
| 36 | } |
| 37 | |
| 38 | void closelog( void ) |
| 39 | { |
| 40 | /* no-op */ |
| 41 | } |