delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/17/02:48:08

Date: Mon, 17 Nov 1997 09:40:36 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Andrew Crabtree <andrewc AT rosemail DOT rose DOT hp DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: GCC -dr?
In-Reply-To: <64ifnu$nd3$1@rosenews.rose.hp.com>
Message-ID: <Pine.SUN.3.91.971117094018.2318E-100000@is>
MIME-Version: 1.0

On Fri, 14 Nov 1997, Andrew Crabtree wrote:

> In the host (xm) DJGPP config file put a
> 
> #define CSE_STAGE_ONE_EXTENSION ".cs1"
> #define CSE_STAGE_TWO_EXTENSION ".cs2"

Please don't do that unconditionally.  When GCC runs on an LFN
platform, it should work like on Unix.  So at least say this:

#define CSE_STAGE_TWO_EXTENSION (_USE_LFN ? ".cse2" : ".cs2")

A better way is to call `_use_lfn' (lower-case) on the full pathname
of the source file, or any directory on the same drive, so that you
know that the filesystem where the dump file will be created actually
supports long names (it can be a networked drive redirected through
network software that doesn't support LFN).

Yet another alternative is to call `pathconf' with _PC_NAME_MAX
parameter and see whether it returns 12 or more; if it's 12, use the
short form.  Personally, I prefer this way, since `pathconf' is a
POSIX function.

It seems like `compile_file' function on toplev.c in gcc source
distribution has all the info.  `dump_base_name' should be used as the
argument to `pathconf' or `_use_lfn' to test for LFN support.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019