bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __alloca patch?


From: Martin Reinders
Subject: Re: __alloca patch?
Date: Tue, 07 May 2019 08:55:57 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 07.05.19 03:36, Paul Smith wrote:
> On Sat, 2019-05-04 at 17:00 -0400, Jeffrey Walton wrote:
>> glob.c:818:27: warning: incompatible pointer types passing 'char **' to
>>       parameter of type 'char *'; dereference with *
>>       [-Wincompatible-pointer-types]
>>             = (char **) realloc (pglob->gl_pathv,
>>                                  ^~~~~~~~~~~~~~~
>>                                  *
> 
> That's odd; realloc() is supposed to take a void* not a char* as the
> first parameter.  Is MacOS really so non-standard?
> 
> 
> _______________________________________________
> Bug-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-make
> 

No, the macOS SDKs declare realloc() as

  void * realloc(void *ptr, size_t size);

But it seems that

  http://git.savannah.gnu.org/cgit/make.git/tree/lib/glob.c

redefines realloc as my_malloc, which is defined locally as

  static char *
  my_realloc (p, n)
       char *p;
       unsigned int n;
  // ...
  # define      realloc my_realloc

Martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]