~ubuntu-branches/ubuntu/utopic/gnustep-base/utopic

« back to all changes in this revision

Viewing changes to Tools/gdnc.m

  • Committer: Package Import Robot
  • Author(s): Paul Gevers
  • Date: 2014-07-19 13:02:18 UTC
  • mfrom: (20.1.6 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20140719130218-pn967l7wzjjf90yi
Tags: 1.24.6-2ubuntu1
* debian/rules:
  - Print the config.log if configure fails to debug
    powerpc/ppc64el FTBFS. (LP: #1277975)

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
static BOOL     is_daemon = NO;         /* Currently running as daemon.  */
70
70
static BOOL     auto_stop = NO;         /* Should we shut down when unused? */
71
71
 
72
 
#ifdef HAVE_SYSLOG
73
 
 
 
72
#if defined(HAVE_SYSLOG) || defined(HAVE_SLOGF)
 
73
#  if defined(HAVE_SLOGF)
 
74
#    include <sys/slogcodes.h>
 
75
#    include <sys/slog.h>
 
76
#    define LOG_CRIT _SLOG_CRITICAL
 
77
#    define LOG_DEBUG _SLOG_DEBUG1
 
78
#    define LOG_ERR _SLOG_ERROR
 
79
#    define LOG_INFO _SLOG_INFO
 
80
#    define LOG_WARNING _SLOG_WARNING
 
81
#    define syslog(prio, msg,...) slogf(_SLOG_SETCODE(_SLOG_SYSLOG, 0), prio, msg, __VA_ARGS__)
 
82
#  endif
74
83
static int      log_priority = LOG_DEBUG;
75
84
 
76
85
static void
78
87
{
79
88
  if (is_daemon)
80
89
    {
 
90
#   if defined(HAVE_SLOGF)
 
91
          // Let's not have 0 as the value for prio. It means "shutdown" on QNX
 
92
      syslog (prio ? prio : log_priority, "%s", ebuf);
 
93
#   else
81
94
      syslog (log_priority | prio, "%s", ebuf);
 
95
#   endif
82
96
    }
83
97
  else if (prio == LOG_INFO)
84
98
    {
95
109
    {
96
110
      if (is_daemon)
97
111
        {
98
 
          syslog (LOG_CRIT, "exiting.");
 
112
          syslog (LOG_CRIT, "%s", "exiting.");
99
113
        }
100
114
      else
101
115
        {
105
119
      exit(EXIT_FAILURE);
106
120
    }
107
121
}
 
122
 
108
123
#else
109
124
 
110
125
#define LOG_CRIT        2