bug-gnulib
[Top][All Lists]
Advanced

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

Compile error in argz.c


From: Gisle Vanem
Subject: Compile error in argz.c
Date: Tue, 26 May 2020 13:49:43 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

The use of '__argv' as parameter names, causes this
error from clang-cl:
  argz.c(234,1): error: conflicting types for 'argz_extract'
  argz_extract (const char *argz, size_t len, char **argv)
  ^
  .\argz.h(68,13): note: previous declaration is here
  extern void argz_extract (const char *restrict __argz, size_t __len,
              ^
  argz.c(251,1): error: conflicting types for 'argz_create'
  argz_create (char *const argv[], char **argz, size_t *len)
  ^
  .\argz.h(48,16): note: previous declaration is here
  extern error_t argz_create (char *const __argv[], char **restrict __argz,
               ^

'__argv' is a macro in Windows' <stdlib.h> that expands
to '(*__p___argv())'.

I could tweak it by a '#undef __argv' first, but...

Ref. the line:
  # elif HAVE_DECL___ARGV   /* mingw, MSVC */

in getprogname.c.

--
--gv



reply via email to

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