Sto compilando grep
sul compilatore GCC 64-bit per Windows 7 x64 SUA/Interix.stddef.h: errore: duplicato 'unsigned'
Si soffoca sulla linea marcata in stddef.h
:
#ifndef _SIZE_T_DEFINED
#if defined (lp64) || defined(_WIN64)
#ifdef lp64
typedef unsigned long size_t; // <------ error
#else /* lp64 */
typedef unsigned __int64 size_t;
#endif /* lp64 */
#else /* (defined(lp64) || defined(_WIN64)) */
typedef unsigned int size_t;
#endif /* (defined(lp64) || defined(_WIN64)) */
#define _SIZE_T_DEFINED
#define _SIZE_T
#endif /* _SIZE_T_DEFINED */
L'uscita per make
è:
make all-recursive
Making all in intl
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../../intl -D_ALL_SOURCE -D_REENTRANT -I/usr/local/include -I/usr/local/include -D_ALL_SOURCE -D_REENTRANT ../../intl/intl-compat.c
In file included from ../../intl/gettextP.h:23:0,
from ../../intl/intl-compat.c:25:
/usr/include/stddef.h:50:23: error: duplicate 'unsigned'
*** Error code 1
Stop in /tmp/grep-2.5.4-src/build/intl.
*** Error code 1
Stop in /tmp/grep-2.5.4-src/build (line 329 of Makefile).
*** Error code 1
Stop in /tmp/grep-2.5.4-src/build (line 244 of Makefile).
Non capisco quale sia la causa ... è già confondendo che long
viene usato come se fosse a 64 bit in GCC, ma l'errore è ancora più confuso! Idee?
Sembra che a lungo sia stato # definito su non firmato da qualche parte nella catena di inclusione. –
E 'possibile che 'size_t' sia predefinito come macro, ad esempio' #define size_t unsigned int' o qualcosa del genere, ma che '_SIZE_T_DEFINED' non è definito? Quindi la riga problematica sarebbe equivalente a 'typedef unsigned long unsigned int;' (o simile), che innescherebbe quel messaggio di errore. – ruakh
Ragazzi avete assolutamente ragione :) Grazie per il puntatore, è stato piuttosto sconcertante. – Mehrdad