This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc problem with filename case insensitivity


> I have a problem which I realise comes from Windows' being
> case-insensitive with filenames.  Even so, maybe someone here knows
> how to solve it.
>
> Suppose I have this source file:
>
> #include <string.h>
> #include "String.h"
>
> int main() {
>   // some stuff
> }
>
> and I compile with "gcc -Imy/include/dir sourcefile.c" where
> String.h lives in my/include/dir.
>
> GCC uses my/include/dir/String.h to satisfy the <string.h> directive.
>
> Is there any way to get GCC to check case when locating include files?
>
> Interestingly, this used to work in B18!  (Hahaha!)
> Seriously, though, the B18 release announcement has this remark:
>
>    The conflict between String.h and string.h (and other such pairs of
> header files) where you include one and get the other has been fixed.
>
> (describing gcc in the release).
>
> A Google search on "filename case gcc site:cygwin.com" turned up only
> 10 hits, and the B18 release announcement was one of them. :-)
>
> Is there any possibility to get case-sensitive behavior from GCC in
> this respect?


I just tried this with "check_case:strict" in my CYGWIN environment
variable, and that works. It finds /usr/include/string.h and my local
include/String.h .


Regards,

Elfyn McBratney
elfyn at exposure dot org dot uk
www.exposure.org.uk



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]