diff options
| author | Mattias Andrée <maandree@kth.se> | 2018-08-25 23:09:08 +0200 | 
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2018-08-25 23:09:08 +0200 | 
| commit | cc1d8fa9c948c0ef4b1e825e0583fbf73c79f3fd (patch) | |
| tree | add42684ef72a048ce4561af11cdeafaf4604f79 | |
| parent | Some fixes and more tests (diff) | |
| download | libsimple-cc1d8fa9c948c0ef4b1e825e0583fbf73c79f3fd.tar.gz libsimple-cc1d8fa9c948c0ef4b1e825e0583fbf73c79f3fd.tar.bz2 libsimple-cc1d8fa9c948c0ef4b1e825e0583fbf73c79f3fd.tar.xz | |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
| -rw-r--r-- | libsimple.h | 14 | 
1 files changed, 8 insertions, 6 deletions
| diff --git a/libsimple.h b/libsimple.h index 4d3520e..a9562ff 100644 --- a/libsimple.h +++ b/libsimple.h @@ -633,9 +633,8 @@ int libsimple_vasprintf(char **, const char *, va_list);  #endif -#ifndef asprintfa -# if defined(__GNUC__) && !defined(__clang__) -#  define asprintfa(__fmt, ...) /* TODO test */\ +#if defined(__GNUC__) && !defined(__clang__) +# define libsimple_asprintfa(__fmt, ...) /* TODO test */\  	({\  		const char *__f = (__fmt);\  		char *__ret = NULL;\ @@ -651,13 +650,14 @@ int libsimple_vasprintf(char **, const char *, va_list);  			__ret;\  		}\  	}) +# ifndef asprintfa +#  define asprintfa(...) libsimple_asprintfa(__VA_ARGS__)  # endif  #endif -#ifndef vasprintfa -# if defined(__GNUC__) || defined(__clang__) -#  define vasprintfa(__fmt, __ap) /* TODO test */\ +#if defined(__GNUC__) || defined(__clang__) +# define libsimple_vasprintfa(__fmt, __ap) /* TODO test */\  	({\  		const char *__f = (__fmt);\  		va_list __a = (__ap);\ @@ -676,6 +676,8 @@ int libsimple_vasprintf(char **, const char *, va_list);  		va_end(__a2);\  		__ret;\  	}) +# ifndef vasprintfa +#  define vasprintfa(fmt, ap) libsimple_vasprintfa(fmt, ap)  # endif  #endif | 
