[Pgpool-general] AIX make problem

Tatsuo Ishii ishii at sraoss.co.jp
Wed Oct 12 10:01:45 UTC 2011


> I'm not familiar with AIX but apparently this is related to the
> portability problem of vsyslog which is not available in AIX (and
> perhaps HP-UX).  If there's no alternative for vsyslog in AIX, we have
> to disable syslog functionality with AIX unless someone comes up with
> more portable vsyslog implementation.

Ok, poking around the internet, I found a code to emulate vsyslog:

http://lists.samba.org/archive/samba-technical/2005-March/039711.html

+#ifndef HAVE_VSYSLOG
+#ifdef HAVE_SYSLOG
+ void vsyslog (int facility_priority, const char *format, va_list arglist)
+{
+	char *msg = NULL;
+	vasprintf(&msg, format, arglist);
+	if (!msg)
+		return;
+	syslog(facility_priority, "%s", msg);
+	SAFE_FREE(msg);
+}
+#endif /* HAVE_SYSLOG */
+#endif /* HAVE_VSYSLOG */

If AIX has vasprintf, this would be a candidate for replacement of
vsyslog.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-general mailing list