- Deal with missing syslog function by making code conditional on
presence of syslog.h header file (DOS/djgpp). (Christophe) - Avoid clash with existing constants (OSX). (Christophe)edge.strict_endians
parent
6497828e53
commit
45c9aa137e
|
@ -115,6 +115,9 @@
|
|||
- Implement simple syslog logging handler (need more work), teach
|
||||
ntfsmount to use it. (Yura)
|
||||
- Fix a lot of bugs in attribute resizing code. (Yura)
|
||||
- Deal with missing syslog function by making code conditional on
|
||||
presence of syslog.h header file (DOS/djgpp). (Christophe)
|
||||
- Avoid clash with existing constants (OSX). (Christophe)
|
||||
|
||||
10/10/2005 - 1.12.1 - Minor fix to location of mount.ntfs-fuse and mkfs.ntfs.
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ AC_CHECK_HEADERS([ctype.h fcntl.h libgen.h libintl.h limits.h locale.h \
|
|||
endian.h byteswap.h sys/byteorder.h sys/endian.h sys/param.h \
|
||||
sys/ioctl.h sys/mount.h sys/stat.h sys/types.h sys/vfs.h \
|
||||
sys/statvfs.h sys/sysmacros.h linux/major.h linux/fd.h linux/hdreg.h \
|
||||
machine/endian.h gcrypt.h windows.h gnutls/pkcs12.h])
|
||||
machine/endian.h gcrypt.h windows.h gnutls/pkcs12.h syslog.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
|
|
|
@ -85,12 +85,24 @@ typedef sle64 leLSN;
|
|||
* enum BOOL - These are just to make the code more readable...
|
||||
*/
|
||||
typedef enum {
|
||||
#ifndef FALSE
|
||||
FALSE = 0,
|
||||
#endif
|
||||
#ifndef NO
|
||||
NO = 0,
|
||||
#endif
|
||||
#ifndef ZERO
|
||||
ZERO = 0,
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
TRUE = 1,
|
||||
#endif
|
||||
#ifndef YES
|
||||
YES = 1,
|
||||
#endif
|
||||
#ifndef ONE
|
||||
ONE = 1,
|
||||
#endif
|
||||
} BOOL;
|
||||
#endif /* defined _WINDEF_H */
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@
|
|||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
|
@ -278,8 +280,10 @@ void ntfs_log_set_handler(ntfs_log_handler *handler)
|
|||
{
|
||||
if (handler) {
|
||||
ntfs_log.handler = handler;
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
if (handler == ntfs_log_handler_syslog)
|
||||
openlog("libntfs", LOG_PID, LOG_USER);
|
||||
#endif
|
||||
} else
|
||||
ntfs_log.handler = ntfs_log_handler_null;
|
||||
}
|
||||
|
@ -337,6 +341,8 @@ int ntfs_log_redirect(const char *function, const char *file,
|
|||
* 0 Message wasn't logged
|
||||
* num Number of output characters
|
||||
*/
|
||||
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
int ntfs_log_handler_syslog(const char *function __attribute__((unused)),
|
||||
const char *file, __attribute__((unused)) int line, u32 level,
|
||||
void *data __attribute__((unused)), const char *format, va_list args)
|
||||
|
@ -393,6 +399,7 @@ int ntfs_log_handler_syslog(const char *function __attribute__((unused)),
|
|||
errno = olderr;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ntfs_log_handler_fprintf - Basic logging handler
|
||||
|
|
Loading…
Reference in New Issue