=================================================================== RCS file: /cvs/mandoc/test-vasprintf.c,v retrieving revision 1.2 retrieving revision 1.5 diff -u -p -r1.2 -r1.5 --- mandoc/test-vasprintf.c 2015/03/20 15:32:02 1.2 +++ mandoc/test-vasprintf.c 2018/08/15 02:15:52 1.5 @@ -1,4 +1,4 @@ -/* $Id: test-vasprintf.c,v 1.2 2015/03/20 15:32:02 schwarze Exp $ */ +/* $Id: test-vasprintf.c,v 1.5 2018/08/15 02:15:52 schwarze Exp $ */ /* * Copyright (c) 2015 Ingo Schwarze * @@ -15,15 +15,14 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#if defined(__linux__) || defined(__MINT__) -#define _GNU_SOURCE /* vasprintf() */ -#endif - #include #include #include -int +static int testfunc(char **, const char *, ...); + + +static int testfunc(char **ret, const char *format, ...) { va_list ap; @@ -33,7 +32,7 @@ testfunc(char **ret, const char *format, ...) irc = vasprintf(ret, format, ap); va_end(ap); - return(irc); + return irc; } int @@ -42,8 +41,8 @@ main(void) char *ret; if (testfunc(&ret, "%s.", "Text") != 5) - return(1); + return 1; if (strcmp(ret, "Text.")) - return(2); - return(0); + return 2; + return 0; }