|
Revision tags: v3.14.0, v3.13.0, v3.12.0, v3.11.1, v3.11.0, v3.10.0, v3.9.0, v3.8.0 |
|
| #
dce0da61 |
| 26-Dec-2021 |
Pali Rohár <[email protected]> |
compat/getopt: Fix compatibility with non-GNU C library
Remove "#if defined(__GNU_LIBRARY__)" guard for getopt() function prototype in compat/getopt.h header file. The only purpose of compat/getopt.
compat/getopt: Fix compatibility with non-GNU C library
Remove "#if defined(__GNU_LIBRARY__)" guard for getopt() function prototype in compat/getopt.h header file. The only purpose of compat/getopt.h header is to provide getopt() function prototype for compatibility purpose on every platform, specially those which do not use GNU C library (e.g. Windows).
Without this change i586-mingw32msvc-gcc compiler complains that function getopt() is used without defined prototype.
Also remove inclusion of #include <string.h> header file in compat/getopt.c source file. Probably due to compatibility purposes compat/getopt.c file has defined custom prototype for function strncmp() incompatible with C99 (length argument in C99 should be of type size_t). Including C99 prototype of strncmp() function from MinGW32 <string.h> header file cause compile errors for i586-mingw32msvc-gcc compiler. Instead of including <stringh> provides custom and simple my_strncmp() implementation.
Thsi change fixes compilation of compat/getopt.c with i586-mingw32msvc-gcc, i686-w64-mingw32-gcc, x86_64-w64-mingw32-gcc and also MSVC cl compilers.
show more ...
|
|
Revision tags: v3.7.0, v3.6.4, v3.6.3, v3.6.2, v3.6.1, v3.6.0, v3.5.6, v3.5.5, v3.5.4, v3.5.3, v3.5.2, v3.5.1, v3.5.0, v3.4.1, v3.4.0, v3.3.1, v3.3.0, v3.2.1, v3.2.0, v3.1.10, v3.1.9, v3.1.8 |
|
| #
4c2bdb01 |
| 04-Dec-2010 |
Martin Mares <[email protected]> |
compat/getopt.c: Fixed a typo in declaration of getopt_long()
|
|
Revision tags: v3.1.7, v3.1.6, v3.1.5, v3.1.4, v3.1.3, v3.1.2, v3.1.1, v3.1.0, v3.1-alpha3, v3.1-alpha2, v3.1-alpha1, v3.0.3, v3.0.2, v3.0.1, v3.0.0 |
|
| #
ee7d8384 |
| 13-Aug-2004 |
Martin Mares <[email protected]> |
Added more parts of the Windows port.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-61
|