projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2401 from alexanderkyte/mobile_static_fixes
[mono.git]
/
support
/
syslog.c
diff --git
a/support/syslog.c
b/support/syslog.c
index f5b96607a28ed2a6cc705aa2fd638d06b14d67c2..2d8d7cbe8006c65ac8947c4156123d3e9f330689 100644
(file)
--- a/
support/syslog.c
+++ b/
support/syslog.c
@@
-11,49
+11,54
@@
#include <syslog.h>
#include <errno.h>
#include <syslog.h>
#include <errno.h>
+#include "map.h"
#include "mph.h"
#include "mph.h"
-#include <glib
/gtypes
.h>
+#include <glib.h>
G_BEGIN_DECLS
int
Mono_Posix_Syscall_openlog (void* ident, int option, int facility)
{
G_BEGIN_DECLS
int
Mono_Posix_Syscall_openlog (void* ident, int option, int facility)
{
- errno = 0;
openlog ((const char*) ident, option, facility);
openlog ((const char*) ident, option, facility);
- return
errno == 0 ? 0 : -1
;
+ return
0
;
}
int
Mono_Posix_Syscall_closelog (void)
{
}
int
Mono_Posix_Syscall_closelog (void)
{
- errno = 0;
closelog ();
closelog ();
- return
errno == 0 ? 0 : -1
;
+ return
0
;
}
}
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wformat-security"
+#endif
int
Mono_Posix_Syscall_syslog (int priority, const char* message)
{
int
Mono_Posix_Syscall_syslog (int priority, const char* message)
{
- errno = 0;
syslog (priority, message);
syslog (priority, message);
- return
errno == 0 ? 0 : -1
;
+ return
0
;
}
}
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif
+
/* vararg version of syslog(3). */
/* vararg version of syslog(3). */
+gint32
+Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...);
+
gint32
Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...)
{
va_list ap;
gint32
Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...)
{
va_list ap;
- errno = 0;
-
va_start (ap, format);
vsyslog (priority, format, ap);
va_end (ap);
va_start (ap, format);
vsyslog (priority, format, ap);
va_end (ap);
- if (errno != 0)
- return -1;
return 0;
}
return 0;
}