lyx_mirror/src/support/snprintf.h
Angus Leeming 9548351ef8 Compaq cxx 6.5 will now compile lyx.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4349 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-10 07:57:39 +00:00

43 lines
1.1 KiB
C++

#ifndef _PORTABLE_SNPRINTF_H_
#define _PORTABLE_SNPRINTF_H_
#define PORTABLE_SNPRINTF_VERSION_MAJOR 2
#define PORTABLE_SNPRINTF_VERSION_MINOR 1
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CXX_GLOBAL_CSTD
using std::size_t;
using std::va_list;
#endif
#if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
#include <stdio.h>
#endif
#ifndef HAVE_DECL_SNPRINTF
int snprintf(char *, size_t, const char *, /*args*/ ...);
#endif
#ifndef HAVE_DECL_VSNPRINTF
int vsnprintf(char *, size_t, const char *, va_list);
#endif
#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
#define snprintf portable_snprintf
#define vsnprintf portable_vsnprintf
#endif
int asprintf (char **ptr, const char *fmt, /*args*/ ...);
int vasprintf (char **ptr, const char *fmt, va_list ap);
int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif