[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP
From: |
Ryan Schmidt |
Subject: |
[sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP |
Date: |
Thu, 19 Aug 2021 19:25:34 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15 |
URL:
<https://savannah.gnu.org/support/?110530>
Summary: Missing #include <string.h> in AC_FUNC_MEMCMP
Project: Autoconf
Submitted by: ryandesign
Submitted on: Thu 19 Aug 2021 11:25:32 PM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: Mac OS
_______________________________________________________
Details:
Hi, dfu-programmer's configure.ac uses:
AC_FUNC_MEMCMP
When the configure script is run with "-Werror=implicit-function-declaration"
in CFLAGS (or with the clang from Xcode 12 or later where that behavior is the
default), configure output contains:
checking for working memcmp... no
and config.log contains:
conftest.c:47:7: error: implicitly declaring library function 'memcmp' with
type 'int (const void *, const void *, unsigned long)'
[-Werror,-Wimplicit-function-declaration]
if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
^
conftest.c:47:7: note: include the header <string.h> or explicitly provide a
declaration for 'memcmp'
conftest.c:61:2: error: implicitly declaring library function 'strcpy' with
type 'char *(char *, const char *)' [-Werror,-Wimplicit-function-declaration]
strcpy (a, "--------01111111");
^
conftest.c:61:2: note: include the header <string.h> or explicitly provide a
declaration for 'strcpy'
2 errors generated.
I believe "#include <string.h>" should be added to AC_FUNC_MEMCMP (in
lib/autoconf/functions.m4).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110530>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP,
Ryan Schmidt <=
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Ryan Schmidt, 2021/08/19
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Zack Weinberg, 2021/08/26
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Ryan Schmidt, 2021/08/30
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Paul Eggert, 2021/08/30
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Ryan Schmidt, 2021/08/31
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Paul Eggert, 2021/08/31
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Ryan Schmidt, 2021/08/31
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Zack Weinberg, 2021/08/31
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Paul Eggert, 2021/08/31
- [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP, Paul Eggert, 2021/08/31