how to disable case sensitivity for file names on *nix?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

how to disable case sensitivity for file names on *nix?

wkitty42

i'm using git to pull a project from sourceforge to a windows box and to a linux
box... on windows, the project compiles fine... on linux, though, all of the
files' names are lowercase but the sources have upper and CaMeL cased file names
in the uses and include statements... i have no control over the project or the
git repository it originates from...

i surely don't want to have to edit the sources to lowercase all the uses and
includes statements every time i update my local repositories... how can i get
it to compile on linux no matter what case the names are? is there anything i
can do on my side of the fence to tell fpc to operate case insensitive?
hopefully a simple command line option i can easily add to my build script?

--
  NOTE: No off-list assistance is given without prior approval.
        Please *keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

Michael Van Canneyt


On Sat, 10 May 2014, waldo kitty wrote:

>
> i'm using git to pull a project from sourceforge to a windows box and to a
> linux box... on windows, the project compiles fine... on linux, though, all
> of the files' names are lowercase but the sources have upper and CaMeL cased
> file names in the uses and include statements... i have no control over the
> project or the git repository it originates from...
>
> i surely don't want to have to edit the sources to lowercase all the uses and
> includes statements every time i update my local repositories... how can i
> get it to compile on linux no matter what case the names are? is there
> anything i can do on my side of the fence to tell fpc to operate case
> insensitive? hopefully a simple command line option i can easily add to my
> build script?

Normally, it should compile if all filenames are lowercase.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

Graeme Geldenhuys-6
In reply to this post by wkitty42
On 2014-05-10 19:09, waldo kitty wrote:
> box... on windows, the project compiles fine... on linux, though, all of the
> files' names are lowercase but the sources have upper and CaMeL cased file names
> in the uses and include statements...

That is the normal way of doing things, and should work fine. At least
that is how most of my commercial software was been written (work shared
with ex-Delphi developers that like CaMel case in uses clauses).


> includes statements every time i update my local repositories... how can i get
> it to compile on linux no matter what case the names are?

I don't believe ext2/3/4 has a case-insensitive option. If you use JFS
(used to be my preferred file system under Linux - originally developed
by IBM), there is a case-insensitive option at the time you create the
file system.

The best file system (in my opinion) is to use ZFS. It comes standard
with FreeBSD, and Linux now has good support for ZFS too, but it must be
user installed, due to incompatible licensing. As with all the awesome
features included with ZFS, you can set case sensitivity whenever you
need on whatever "partition" you create. NOTE: ZFS "partitions" are
nothing like traditional file systems. You can create and destroy them
at will (almost like directories).



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

Sven Barth-2
In reply to this post by wkitty42
On 10.05.2014 20:09, waldo kitty wrote:
>
> i'm using git to pull a project from sourceforge to a windows box and to
> a linux box... on windows, the project compiles fine... on linux,
> though, all of the files' names are lowercase but the sources have upper
> and CaMeL cased file names in the uses and include statements... i have
> no control over the project or the git repository it originates from...

FPC will look for each unit and include file (including directory names)
in lowercase, UPPERCASE and AsWritten (AFAIK even in that order)

> i surely don't want to have to edit the sources to lowercase all the
> uses and includes statements every time i update my local
> repositories... how can i get it to compile on linux no matter what case
> the names are? is there anything i can do on my side of the fence to
> tell fpc to operate case insensitive? hopefully a simple command line
> option i can easily add to my build script?
>

You can't tell FPC to operate in a totally case insensitive way, because
then the compiler would need to check for ANY possible spelling of the
filename (plus extension), because if an underlying filesystem is case
sensitive then a.pas would be different from A.PAS which would also be
different from a.PAS as well as A.pas and so on...

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

wkitty42
In reply to this post by Michael Van Canneyt
On 5/10/2014 2:18 PM, Michael Van Canneyt wrote:
> On Sat, 10 May 2014, waldo kitty wrote:
>> i surely don't want to have to edit the sources to lowercase all the uses and
>> includes statements every time i update my local repositories... how can i get
>> it to compile on linux no matter what case the names are? is there anything i
>> can do on my side of the fence to tell fpc to operate case insensitive?
>> hopefully a simple command line option i can easily add to my build script?
>
> Normally, it should compile if all filenames are lowercase.

interesting...

--
  NOTE: No off-list assistance is given without prior approval.
        Please *keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

wkitty42
In reply to this post by Sven Barth-2
On 5/10/2014 5:14 PM, Sven Barth wrote:

> On 10.05.2014 20:09, waldo kitty wrote:
>>
>> i'm using git to pull a project from sourceforge to a windows box and to
>> a linux box... on windows, the project compiles fine... on linux,
>> though, all of the files' names are lowercase but the sources have upper
>> and CaMeL cased file names in the uses and include statements... i have
>> no control over the project or the git repository it originates from...
>
> FPC will look for each unit and include file (including directory names) in
> lowercase, UPPERCASE and AsWritten (AFAIK even in that order)

maybe this is not the problem i'm facing, then... i'll have to dig deeper into
the build script... it is a very simple build script but there may be a bug in
it with an environment variable it sets for the library files...

>> i surely don't want to have to edit the sources to lowercase all the
>> uses and includes statements every time i update my local
>> repositories... how can i get it to compile on linux no matter what case
>> the names are? is there anything i can do on my side of the fence to
>> tell fpc to operate case insensitive? hopefully a simple command line
>> option i can easily add to my build script?
>
> You can't tell FPC to operate in a totally case insensitive way, because then
> the compiler would need to check for ANY possible spelling of the filename (plus
> extension), because if an underlying filesystem is case sensitive then a.pas
> would be different from A.PAS which would also be different from a.PAS as well
> as A.pas and so on...

yes, i remember the discussion some time (several years?) back... i spent some
time rereading over it before making my post, too...

thank you to you and michael van canneyt for your responses...

--
  NOTE: No off-list assistance is given without prior approval.
        Please *keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

Sven Barth-2

Am 10.05.2014 23:39 schrieb "waldo kitty" <[hidden email]>:
>
> On 5/10/2014 5:14 PM, Sven Barth wrote:
>>
>> On 10.05.2014 20:09, waldo kitty wrote:
>>>
>>>
>>> i'm using git to pull a project from sourceforge to a windows box and to
>>> a linux box... on windows, the project compiles fine... on linux,
>>> though, all of the files' names are lowercase but the sources have upper
>>> and CaMeL cased file names in the uses and include statements... i have
>>> no control over the project or the git repository it originates from...
>>
>>
>> FPC will look for each unit and include file (including directory names) in
>> lowercase, UPPERCASE and AsWritten (AFAIK even in that order)
>
>
> maybe this is not the problem i'm facing, then... i'll have to dig deeper into the build script... it is a very simple build script but there may be a bug in it with an environment variable it sets for the library files...

You could add the option -vut to see which files the compiler tries to use (t) and which it does then finally use (u). Be aware though that this might get noisy ;)

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: how to disable case sensitivity for file names on *nix?

wkitty42
On 5/11/2014 3:29 AM, Sven Barth wrote:
> You could add the option -vut to see which files the compiler tries to use (t)
> and which it does then finally use (u). Be aware though that this might get noisy ;)

i thought i had replied back in this thread that i had found the problem... i
used -vav and finally saw that i had a typo in the -Fu and -Fi entries... one
character too many or lacking can make all the difference :/

--
  NOTE: No off-list assistance is given without prior approval.
        Please *keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal