view src/portable.h @ 244:4e69e9b722ae noffle

[svn] * src/database.c,src/protocol.c,src/util.c,src/util.h: The latest IETF article format draft draft-ietf-usefor-article-06.txt recommends that Xref: references contain the FQDN of the server. We were using the host name without the domain. So split the routine used for obtaining the FQDN from protocol.c into util.c, and use it when adding Xrefs.
author bears
date Fri, 15 Mar 2002 10:50:33 +0000
parents c7df2cc65cc1
children
line wrap: on
line source

/*
  portable.h

  Compatibility checks and fallback-functions.

  $Id: portable.h 80 2000-05-13 15:36:35Z bears $
*/

#ifndef PORTABLE_H
#define PORTABLE_H    /* To stop multiple inclusions. */


#if HAVE_CONFIG_H
#include <config.h>
#endif

#if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
#undef vsnprintf
#define vsnprintf __vsnprintf
#define HAVE_VSNPRINTF
#endif

/* This is *not* good, because vsprintf() doesn't do any bounds-checking */
#if !defined(HAVE_VSNPRINTF) && !defined(HAVE___VSNPRINTF)
#define vsnprintf(c, len, fmt, args) vsprintf(c, fmt, args)
#define HAVE_VSNPRINTF
#endif

#if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF)
#undef snprintf
#define snprintf __snprintf
#define HAVE_SNPRINTF
#endif

/* Indicate deliberately unused argument. Possibly compiler specific. */
#define	UNUSED(x)	{ ( void ) x; }

#endif