X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_YG X-Spam-Check-By: sourceware.org X-Received: by 10.14.174.198 with SMTP id x46mr204892480eel.23.1357941628972; Fri, 11 Jan 2013 14:00:28 -0800 (PST) Message-ID: <50F08B7A.8000900@gmail.com> Date: Fri, 11 Jan 2013 23:00:26 +0100 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: XOPEN_SOURCE and strings.h References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 1/11/2013 10:47 PM, Denis Excoffier wrote: > Hello, > > In order to compile some packages (including slang-2.2.4 and ccrypt-1.9) > with GCC-4.7.2, i had to patch /usr/include/string.h iaw the following: > > > diff -uNr x-o/usr/include/string.h x-p/usr/include/string.h > --- x-o/usr/include/string.h 2012-11-23 14:40:09.000000000 +0100 > +++ x-p/usr/include/string.h 2013-01-11 22:29:39.000000000 +0100 > @@ -64,13 +64,13 @@ > char *_EXFUN(strcasestr,(const char *, const char *)); > char *_EXFUN(strchrnul,(const char *, int)); > #endif > -#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 500) > +#if !defined(__STRICT_ANSI__) || ((_XOPEN_SOURCE - 0) >= 500) > char *_EXFUN(strdup,(const char *)); > #endif > #ifndef __STRICT_ANSI__ > char *_EXFUN(_strdup_r,(struct _reent *, const char *)); > #endif > -#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 700) > +#if !defined(__STRICT_ANSI__) || ((_XOPEN_SOURCE - 0) >= 700) > char *_EXFUN(strndup,(const char *, size_t)); > #endif > #ifndef __STRICT_ANSI__ > > > > See also /usr/include/sys/features.h. > > Otherwise i obtain the message: > > /usr/include/string.h:67:49: error: operator '>=' has no left operand > /usr/include/string.h:73:49: error: operator '>=' has no left operand > > Hope this helps, > > Regards, > > Denis Excoffier. > > are you sure about that file ? _XOPEN_SOURCE is not present on string.h $ cygcheck -f /usr/include/string.h cygwin-1.7.17-1 $ grep XOPEN /usr/include/string.h Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple