about summary refs log tree commit diff
path: root/Src/system.h
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2000-09-16 18:57:45 +0000
committerClint Adams <clint@users.sourceforge.net>2000-09-16 18:57:45 +0000
commit2742cb14ce02354f6c9a2a2a61f793f9a1932924 (patch)
tree7c098832770e48dcc5d4c2cb27c32ed464fb3720 /Src/system.h
parent73e23c7999196642fcf3448013b4e37b03044e8c (diff)
downloadzsh-2742cb14ce02354f6c9a2a2a61f793f9a1932924.tar.gz
zsh-2742cb14ce02354f6c9a2a2a61f793f9a1932924.tar.xz
zsh-2742cb14ce02354f6c9a2a2a61f793f9a1932924.zip
12814: zasprintf
Diffstat (limited to 'Src/system.h')
-rw-r--r--Src/system.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Src/system.h b/Src/system.h
index 93e82a728..fc85efdb4 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -227,6 +227,26 @@ struct timezone {
 # define zopenmax() ((long) OPEN_MAX)
 #endif
 
+#if defined (__STDC__) && defined (HAVE_STDARG_H)
+# define PREFER_STDARG
+# define USE_VARARGS
+# include <stdarg.h>
+#else
+# ifdef HAVE_VARARGS_H
+#  define PREFER_VARARGS
+#  define USE_VARARGS
+#  include <varargs.h>
+# endif
+#endif
+
+#ifdef HAVE_ASPRINTF
+# ifdef __GNUC__
+# define zasprintf(X,F,A...) asprintf(X,F, ## A)
+# else
+# define zasprintf asprintf
+# endif
+#endif
+
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
 #else