This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Trouble Migrating from Windows to Linux
- From: Brian Budge <brian dot budge at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: James Cobban <jamescobban at sympatico dot ca>, gcc-help at gcc dot gnu dot org
- Date: Sat, 16 May 2009 13:55:26 -0700
- Subject: Re: Trouble Migrating from Windows to Linux
- References: <23576394.post@talk.nabble.com> <m3hbzkdhfq.fsf@google.com>
In Linux, you can use the glob/wordexp functions for this, or do it
yourself with getenv.
On Sat, May 16, 2009 at 11:35 AM, Ian Lance Taylor <iant@google.com> wrote:
> James Cobban <jamescobban@sympatico.ca> writes:
>
>> while on Linux it reads:
>> ? ? ? "~/Windows/Archives/Database/SubDistTable1881.csv"
>> and writes to:
>> ? ? ? "~/Windows/Archives/Database"
>
> Note that on Linux/Unix the name "~" is not special when you call open
> or fopen or similar functions. ?The name "~" is expanded by the shell;
> specifically an unquoted ~ at the start of a pathname, followed by a /,
> is replaced by the contents of the environment variable HOME, or, if
> HOME is not set, by the home directory of the user executing the shell.
> If you are not using the shell, you need to expand "~" yourself.
>
> Ian
>