Mail Archives: djgpp-workers/1999/09/05/10:18:49
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 -