[syslog-ng] bugreport for 1.9.5 on solaris [PATCH]
Roberto Nibali
ratz at drugphish.ch
Sat Oct 8 01:00:55 CEST 2005
>>> Just my 2 cents ...
>> I'm sure you're right, I'll follow up with this and make sure. Thanks
>> for looking at it.
>
> Yes, configure couldn't find getopt.h and went ahead without it. Thanks,
> and sorry for the hassle.
How do the configure output lines look like at your side?
./configure | grep getopt
The following patch fixes your reported issue by simply removing the
output of the long options when HAVE_GETOPT_LONG is not set in config.h.
I couldn't think of anything more intelligent :)
--- syslog-ng-1.9.5+20051003/src/main.c 2005-10-03 00:11:44.000000000 +0200
+++ syslog-ng-1.9.5+20051003-ratz/src/main.c 2005-10-07
22:41:01.435378460 +0200
@@ -58,6 +58,7 @@
static gid_t gid = 0;
+#if HAVE_GETOPT_LONG
void usage(void)
{
printf("Usage: syslog-ng [options]\n"
@@ -81,6 +82,31 @@
exit(0);
}
+#else
+void usage(void)
+{
+ printf("Usage: syslog-ng [options]\n"
+ "Accept and manage system log messages\n\n"
+ "Options:\n"
+ " -s Only read and parse config
file\n"
+ " -d Turn on debugging messages\n"
+ " -v Be a bit more verbose\n"
+ " -e Log internal messages to
stderr\n"
+ " -F Don't fork into background\n"
+ " -f <fname> Set config file name,
default=" PATH_SYSLOG_NG_CONF "\n"
+ " -V Display version number ("
PACKAGE " " VERSION ")\n"
+ " -p <fname> Set pid file name,
default=" PATH_PIDFILE "\n"
+ " -C <dir> Chroot to directory\n"
+ " -u <user> Switch to user\n"
+ " -g <group> Switch to group\n"
+#ifdef YYDEBUG
+ " -y Turn on yacc debug messages\n"
+#endif
+ );
+
+ exit(0);
+}
+#endif
static void
sig_hup_handler(int signo)
Bazsi, if you think this is worth it, apply the patch.
Cheers,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc
More information about the syslog-ng
mailing list