syslog.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Generic syslog.h */
  2. /* $OpenLDAP$ */
  3. /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  4. *
  5. * Copyright 1998-2022 The OpenLDAP Foundation.
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted only as authorized by the OpenLDAP
  10. * Public License.
  11. *
  12. * A copy of this license is available in file LICENSE in the
  13. * top-level directory of the distribution or, alternatively, at
  14. * <http://www.OpenLDAP.org/license.html>.
  15. */
  16. #ifndef _AC_SYSLOG_H_
  17. #define _AC_SYSLOG_H_
  18. #if defined( HAVE_SYSLOG_H )
  19. #include <syslog.h>
  20. #elif defined ( HAVE_SYS_SYSLOG_H )
  21. #include <sys/syslog.h>
  22. #endif
  23. #if defined( LOG_NDELAY ) && defined( LOG_NOWAIT )
  24. # define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT )
  25. #elif defined( LOG_NDELAY )
  26. # define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY )
  27. #elif defined( LOG_NOWAIT )
  28. # define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT )
  29. #elif defined( LOG_PID )
  30. # define OPENLOG_OPTIONS ( LOG_PID )
  31. #else
  32. # define OPENLOG_OPTIONS ( 0 )
  33. #endif
  34. #endif /* _AC_SYSLOG_H_ */