[syslog-ng] bugreport for 1.9.5 on solaris [PATCH]
Balazs Scheidler
bazsi at balabit.hu
Mon Oct 10 11:49:01 CEST 2005
Hi,
I'd rather change to using libpopt (although it is another external
dependency, hmm), it generates usage and help screens nicely, so that's
sure I won't forget to add them there myself.
On Sat, 2005-10-08 at 01:00 +0200, Roberto Nibali wrote:
> >>> 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
--
Bazsi
More information about the syslog-ng
mailing list