Je suis passé à gcc 4.0.0 et beaucoup de petits problèmes ont disparu. Je suis très exigent et j'utilise à fond les possibilités).

J'utilise _GNU_SOURCE et dans les environnements non GNU, je fournis les fonctions correspondants.

Avec ces options, je n'ai jamais eu aucun problème de compilation en passant le code sous HP-UX, AIX, SOLARIS et ... Windows.

Yves


# We want :
#    Single Unix V3 things.
#        with respect to:
#    POSIX.1-2001, UNIX 98, UNIX 95, POSIX.1-1996, POSIX.2-1992,
#        the ISO C standard, C89, SVID3 and BSD 4.3
#
#    __STDC__==1        ANSI/ISO 9899-1990 (ANSI C)
#    __STRICT_ANSI__        ANSI/ISO 9899-1990 (ANSI C)
#    _ISOC99_SOURCE        Extensions to ISO C89 from ISO C99.
#    __STDC_VERSION__    If >=199409L, ANSI/ISO 9899-1990+AM1-1995
#                  (ANSI C + MSE)
#    _POSIX_SOURCE        POSIX.1 (1988) (IEEE Standard 1003.1)
#    _POSIX_C_SOURCE        If ==1, POSIX.1 (IEEE 1003.1-1990)
#                If >=2, add POSIX.2 (IEEE 1003.2-1992)
#                If >= 199309L, add POSIX.1b (IEEE 1003.1b-1993)
#                If >= 199506L, add POSIX.1c (IEEE 1003.1c-1995)
#                If >= 200112L, IEEE 1003.1-2001
#    _XOPEN_SOURCE        If ==1, XPG4 [Superset of POSIX.1 and POSIX.2]
#                If ==500, UNIX 98 (Single Unix Specification,
#                    version 2)
#                If ==600, Issue 6 (Single Unix Specification,
#                    version 3)
#    _XOPEN_SOURCE_EXTENDED    XPG things and X/Open Unix extensions.
#    _BSD_SOURCE        ISO C, POSIX, and 4.4BSD definitions
#    _SVID_SOURCE        ISO C, POSIX, and SVID definitions
#    _GNU_SOURCE        All of the above, plus GNU extensions.
#    _NUTC_SOURCE        Enable NuTC extensions
#    _REENTRANT        Select additionally reentrant object.
#    _THREAD_SAFE        Same as _REENTRANT, often used by other systems.
#
#   The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
#
# Single Unix Specification, version 3

-pipe -Wall -Wshadow -Wstrict-prototypes -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600
-D_REENTRANT


Patrick CAO HUU THIEN a écrit :

Patrick CAO HUU THIEN a dit le 08.07.2005 11:10:

bonjour,

j'ai un code c avec la librairie <ansi_c.h> et mon gcc me dit qu il ne connait pas !!!!!


j'ai trouve tout seul: il suffit d'ajouter "-ansi" aux options

desole pour la precipitation de la question

____________________________________________________
Want to buy your Pack or Services from Mandriva? Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________
begin:vcard
fn:Yves Crespin
n:Crespin;Yves
org:Quartz
adr:Les Ardillais;;104, Impasse Moissan;CROLLES;;38920;France
email;internet:[EMAIL PROTECTED]
tel;work:04.76.92.21.91
tel;cell:06.86.42.86.81
x-mozilla-html:FALSE
url:http://crespin.quartz.free.fr/
version:2.1
end:vcard

____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

Répondre à