Add mg from #2398
[packages.git] / utils / mg / patches / 100-mg.patch
1 --- mg-20070529.orig/sysdef.h   2006-08-01 16:34:08.000000000 -0700
2 +++ mg-20070529/sysdef.h        2007-09-16 15:07:53.000000000 -0700
3 @@ -20,9 +20,10 @@
4  
5  /* necesarry to get asprintf & friends with glibc XXX doesn't work for some
6   * mysterious reason! */
7 -/* #ifdef __GLIBC__ */
8 -/* #  define _GNU_SOURCE */
9 -/* #endif */
10 +#ifdef __GLIBC__
11 +#  define _GNU_SOURCE
12 +#  define _USE_GNU
13 +#endif
14  #include <stdio.h>
15  
16  #include <unistd.h>
17 @@ -56,13 +57,6 @@
18  extern size_t strlcat(char *, const char *, size_t);
19  #endif
20  
21 -/* Manpage says: #define _GNU_SOURCE, does that work? No! */
22 -#ifdef __GLIBC__
23 -extern int asprintf (char **, const char *, ...);
24 -extern int vasprintf (char **, const char *, _G_va_list);
25 -#endif
26 -
27 -
28  /* not provided by glibc stdio.h */
29  #ifdef HAVE_NOFGETLN
30  extern char * fgetln(FILE *, size_t *);