The best way to work crossplatform is to make sure your IDE is set to
"Auto rename file lowercase"
in both the cases where this is one of the options.
(See IDE Options dialog, Environment, Naming page and the two sections:
"Ambiguous file action"
"Save As - auto rename Pascal files lowercase"
Note that the file name of a unit will then be renamed by the IDE (if necessary) all lowercase. However, the unit name, the identifier appearing after the reserved word
unit at the start of the unit will remain in the casing you first gave it.
For instance your unit might be named MainProgramUnit. The unit would begin thus:
unit MainProgramUnit;
{$mode objfpc}{$H+}
interface
Although the unit has this CamelCased name, the filename of the unit (as seen by the OS) will have been changed by the IDE to mainprogramunit.pas (or perhaps mainprogramunit.pp, depending on your settings).
This distinction between the
unit name and its associated
filename can be confusing for newcomers to Pascal.