delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/09/05/10:18:49

Date: Sun, 5 Sep 1999 16:01:03 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: pavenis AT lanet DOT lv
cc: djgpp-workers AT delorie DOT com
Subject: Re: new GCC port
In-Reply-To: <B0000099319@stargate.astr.lu.lv>
Message-ID: <Pine.SUN.3.91.990905160000.20300g-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 25 Aug 1999 pavenis AT lanet DOT lv wrote:

> I think using environment variable TOP in dxegen.c can be dangerous 
> if somebody will use it due to some other reason. As result that can 
> break DXEGEN.EXE in some conditions.

Is the following better?

*** src/dxe/dxegen.c~1	Tue Aug 24 14:06:18 1999
--- src/dxe/dxegen.c	Sat Sep  4 12:08:14 1999
*************** int main(int argc, char **argv)
*** 96,115 ****
      strcpy(command, "ld");
  #endif
      strcat(command, " -X -S -r -o dxe__tmp.o -L");
!     libdir = getenv("TOP");
      if (libdir)
!       strcat(command, "../../");
      else
      {
        libdir = getenv("DJDIR");
        if (!libdir)
        {
! 	fprintf(stderr, "Error: neither DJDIR nor TOP are set in environment\n");
  	exit(1);
        }
      }
!     strcat(command, libdir);
!     strcat(command, "/lib ");
      for(i=3;argv[i];i++)
      {
        strcat(command, argv[i]);
--- 96,116 ----
      strcpy(command, "ld");
  #endif
      strcat(command, " -X -S -r -o dxe__tmp.o -L");
!     libdir = getenv("DXE_LD_LIBRARY_PATH");
      if (libdir)
!       strcat(command, libdir);
      else
      {
        libdir = getenv("DJDIR");
        if (!libdir)
        {
! 	fprintf(stderr, "Error: neither DXE_LD_LIBRARY_PATH nor DJDIR are set in environment\n");
  	exit(1);
        }
+       strcat(command, libdir);
+       strcat(command, "/lib");
      }
!     strcat(command, " ");
      for(i=3;argv[i];i++)
      {
        strcat(command, argv[i]);
*** src/libemu/makefile.~0	Sun Sep 27 23:07:54 1998
--- src/libemu/makefile	Sat Sep  4 12:16:36 1999
***************
*** 1,7 ****
  # Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details
  # Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details
  TOP=.
! export TOP
  
  LIBNAME=emu
  
--- 1,9 ----
+ # Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details
  # Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details
  # Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details
  TOP=.
! DXE_LD_LIBRARY_PATH=$(TOP)/../../lib
! export DXE_LD_LIBRARY_PATH
  
  LIBNAME=emu
  

- Raw text -


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