Thu Jun 7 16:02:16 2018 UTC ()
Pull up following revision(s) (requested by nonaka in ticket #836):
	external/gpl2/gmake/dist/glob/glob.c: revision 1.5
gmake: __alloca and __stat are provided only when building with GLIBC.
Fix a build failure on Ubuntu 18.04.


(martin)
diff -r1.1.1.1.8.1 -r1.1.1.1.8.2 src/external/gpl2/gmake/dist/glob/glob.c

cvs diff -r1.1.1.1.8.1 -r1.1.1.1.8.2 src/external/gpl2/gmake/dist/glob/glob.c (expand / switch to unified diff)

--- src/external/gpl2/gmake/dist/glob/glob.c 2018/04/17 08:04:34 1.1.1.1.8.1
+++ src/external/gpl2/gmake/dist/glob/glob.c 2018/06/07 16:02:16 1.1.1.1.8.2
@@ -197,50 +197,50 @@ my_realloc (p, n) @@ -197,50 +197,50 @@ my_realloc (p, n)
197# endif 197# endif
198{ 198{
199 /* These casts are the for sake of the broken Ultrix compiler, 199 /* These casts are the for sake of the broken Ultrix compiler,
200 which warns of illegal pointer combinations otherwise. */ 200 which warns of illegal pointer combinations otherwise. */
201 if (p == NULL) 201 if (p == NULL)
202 return (char *) malloc (n); 202 return (char *) malloc (n);
203 return (char *) realloc (p, n); 203 return (char *) realloc (p, n);
204} 204}
205# define realloc my_realloc 205# define realloc my_realloc
206# endif /* __SASC */ 206# endif /* __SASC */
207#endif /* __GNU_LIBRARY__ */ 207#endif /* __GNU_LIBRARY__ */
208 208
209 209
210#if !defined __alloca && !(defined __GNU_LIBRARY__ || defined __GLIBC__) 210#if !defined __alloca
211 211
212# ifdef __GNUC__ 212# ifdef __GNUC__
213# undef alloca 213# undef alloca
214# define alloca(n) __builtin_alloca (n) 214# define alloca(n) __builtin_alloca (n)
215# else /* Not GCC. */ 215# else /* Not GCC. */
216# ifdef HAVE_ALLOCA_H 216# ifdef HAVE_ALLOCA_H
217# include <alloca.h> 217# include <alloca.h>
218# else /* Not HAVE_ALLOCA_H. */ 218# else /* Not HAVE_ALLOCA_H. */
219# ifndef _AIX 219# ifndef _AIX
220# ifdef WINDOWS32 220# ifdef WINDOWS32
221# include <malloc.h> 221# include <malloc.h>
222# else 222# else
223extern char *alloca (); 223extern char *alloca ();
224# endif /* WINDOWS32 */ 224# endif /* WINDOWS32 */
225# endif /* Not _AIX. */ 225# endif /* Not _AIX. */
226# endif /* sparc or HAVE_ALLOCA_H. */ 226# endif /* sparc or HAVE_ALLOCA_H. */
227# endif /* GCC. */ 227# endif /* GCC. */
228 228
229# define __alloca alloca 229# define __alloca alloca
230 230
231#endif 231#endif
232 232
233#ifndef __GNU_LIBRARY__ 233#if !defined __stat
234# define __stat stat 234# define __stat stat
235# ifdef STAT_MACROS_BROKEN 235# ifdef STAT_MACROS_BROKEN
236# undef S_ISDIR 236# undef S_ISDIR
237# endif 237# endif
238# ifndef S_ISDIR 238# ifndef S_ISDIR
239# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) 239# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
240# endif 240# endif
241#endif 241#endif
242 242
243#ifdef _LIBC 243#ifdef _LIBC
244# undef strdup 244# undef strdup
245# define strdup(str) __strdup (str) 245# define strdup(str) __strdup (str)
246# define sysconf(id) __sysconf (id) 246# define sysconf(id) __sysconf (id)