X-Authentication-Warning: new-smtp2.ihug.com.au: Host p192-tnt4.syd.ihug.com.au [203.173.134.192] claimed to be acceleron Message-ID: <000c01c10944$9ad2fff0$0a02a8c0@acceleron> From: "Andrew Cottrell" To: Subject: DJDIR Windows 2000 investigation results #1 Date: Tue, 10 Jul 2001 23:31:18 +1000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0009_01C10998.6BA307D0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Reply-To: djgpp-workers AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C10998.6BA307D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I checked out the code as Eli suggested and traced a quirk (I do not = know enough about the LFN API to call it a bug) using Ralph Browns = Interrupt List 6.1. I have attached the app that I used for the = investigation (only the final version). Sorry for including such a large = code snippet, but I thought that this would help, let me know what I = should do in the future so as not to cause any problems. The quirk I found was that if I remove the "| 0x1000" in the code as = commented then the DJDIR environment variable is inserted into the app's = environment on Windows 2000. It made no difference on the WIN 98SE box = that I used to compile the app on if it was included or not.=20 What does the 0x1000 bit do? It is unused in Ralph's list as indicated = in the following table (interrupt.h file): Bitfields for Windows95 file access/sharing modes: Bit(s) Description (Table 01782) 2-0 file access mode 000 read-only 001 write-only 010 read-write 100 read-only, do not modify file's last-access time 6-4 file sharing modes 7 no-inherit flag 8 do not buffer data (requires that all reads/writes be exact = physical sectors) 9 do not compress file even if volume normally compresses files 10 use alias hint in DI as numeric tail for short-name alias 12-11 unused??? (0) 13 return error code instead of generating INT 24h if critical = error while opening file 14 commit file after every write operation The output from Windows 2000 is=20 TEST 1: This app is i:/dj204/contrib/test/main.exe djgpp_var D:/DJGPP/DJGPP.ENV main.c 46 main.c 90 D:/DJGPP/DJGPP.ENV djgpp_env 5 112 116 122 177 210 210 210 241 putenv DJDIR=3Dd:/djgpp 177 186 putenv USER=3Ddosuser 177 186 putenv GROUP=3Droot 177 186 241 putenv TMPDIR=3Dd:/djgpp/tmp 177 186 241 putenv EMU387=3Dd:/djgpp/bin/emu387.dxe 177 186 177 186 241 putenv TEXMFMAIN=3Dd:/djgpp/share/texmf 177 186 241 putenv GO32STUB=3Dd:/djgpp/bin/stubify.exe TEST 2: This app is i:/dj204/contrib/test/main.exe djgpp_var D:/DJGPP/DJGPP.ENV main.c 46 87 D:/DJGPP/DJGPP.ENV, error no (register AX) =3D 0x57djgpp_env -1 Any ideas on what I should do next? Is it worth performing a test and = remove all of the " | 0x1000" from the LFN functions and re-compile the = DJGPP CVS 2.04 tarball and test again? If you need to send me an email then remove then remove the .oz from the = email address. Thanks, Andrew -------------------------------------------------- CODE START = ----------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define acprintf(A,B) printf("%s %d " A " \n", __FILE__,__LINE__,B) #define acdebug printf("%s %d \n",__FILE__,__LINE__); #define acdebugnl printf("%d ",__LINE__); int ac_open (const char *filename, int oflag, int use_fat32) { __dpmi_regs r; int rv; int use_lfn =3D _USE_LFN; if (filename =3D=3D 0) { acdebug errno =3D EINVAL; return -1; } if (__FSEXT_call_open_handlers (__FSEXT_open, &rv, &filename)) { acdebug return rv; } if (use_lfn) { acdebug r.x.ax =3D 0x716c; #if 1 r.x.bx =3D (oflag & 0xff) | use_fat32; /* 0x1000 is FAT32 extended = size. */ #else ORIGINAL LINE -- r.x.bx =3D (oflag & 0xff) | 0x1000; /* 0x1000 is = FAT32 extended size. */ r.x.bx =3D (oflag & 0xff) ; /* 0x1000 is FAT32 extended size. */ #endif r.x.dx =3D 1; /* Open existing file */ r.x.si =3D __tb_offset; } else { acdebug if (7 <=3D _osmajor && _osmajor < 10) { acdebug r.x.ax =3D 0x6c00; r.x.bx =3D (oflag & 0xff) | 0x1000; /* 0x1000 is FAT32 extended size. = */ /* FAT32 extended size flag doesn't help on WINDOZE 4.1 (98). It seems it has a bug which only lets you create these big files if LFN is enabled. */ r.x.dx =3D 1; /* Open existing file */ r.x.si =3D __tb_offset; } else { acdebug r.h.ah =3D 0x3d; r.h.al =3D oflag; r.x.dx =3D __tb_offset; } } r.x.cx =3D 0; r.x.ds =3D __tb_segment; _put_path (filename); __dpmi_int (0x21, &r); if (r.x.flags & 1) { errno =3D __doserr_to_errno (r.x.ax); printf("%d %s, error no (register AX) =3D 0x%X",__LINE__, = filename, r.x.ax); return -1; } acprintf("%s",filename); __file_handle_set (r.x.ax, O_BINARY); return r.x.ax; } void test_environment_file (char *app_name, int use_fat32) { int djgpp_env; char *djgpp_var =3D getenv ("DJGPP"); printf ("djgpp_var %s \n", djgpp_var); if (djgpp_var) { djgpp_env =3D ac_open(djgpp_var, O_RDONLY, use_fat32); printf ("djgpp_env %d \n", djgpp_env); if (djgpp_env >=3D 0) { char *file; char base[PATH_MAX], *bp, *a0p, *tb; int this_prog =3D 1; int fsize =3D lseek (djgpp_env, 0L, SEEK_END); acdebugnl file =3D (char *) malloc (fsize + 2); if (file =3D=3D 0) return; acdebugnl lseek (djgpp_env, 0L, 0); _read (djgpp_env, file, fsize); _close (djgpp_env); if (file[fsize - 1] =3D=3D '\n') { acdebugnl file[fsize] =3D 0; } else { acdebugnl file[fsize] =3D '\n'; file[fsize + 1] =3D 0; } tb =3D file; base[0] =3D '['; bp =3D app_name; for (a0p =3D bp; *a0p; a0p++) if (strchr ("\\/:", *a0p)) bp =3D a0p + 1; for (a0p =3D base + 1; *bp && *bp !=3D '.';) *a0p++ =3D tolower ((unsigned char) *bp++); *a0p++ =3D ']'; *a0p++ =3D 0; bp =3D tb; while (1) { tb =3D bp; while (*tb && (*tb =3D=3D '\n' || *tb =3D=3D '\r')) tb++; bp =3D tb; while (*bp && *bp !=3D '\n' && *bp !=3D '\r') bp++; if (*bp =3D=3D 0) break; *bp++ =3D 0; if (tb[0] =3D=3D 0 || tb[0] =3D=3D '#') continue; if (tb[0] =3D=3D '[') { char *p =3D bp - 2; /* Some losers leave trailing blanks after "[foo]". */ while (p > tb && (*p =3D=3D ' ' || *p =3D=3D '\t')) p--; *++p =3D 0; if (strcmp (tb, base) =3D=3D 0) this_prog =3D 1; else this_prog =3D 0; } else { if (this_prog) { char *buf =3D alloca (fsize); char *tb2 =3D buf; char *sp =3D tb, *dp =3D tb2; acdebugnl while (*sp !=3D '=3D' && *sp !=3D '\n' && *sp) *dp++ =3D *sp++; if (*sp =3D=3D '\n' || *sp =3D=3D '\0') { tb =3D sp; continue; } if (*tb2 =3D=3D '+') /* non-overriding */ { acdebugnl * dp =3D 0; tb2++; if (getenv (tb2)) continue; /* while scanning bytes */ } *dp++ =3D *sp++; /* copy the '=3D' */ while (*sp) { if (*sp =3D=3D '%') { char *pp; if (sp[1] =3D=3D '%') { *dp++ =3D '%'; sp +=3D 2; } else { char ps, *e, *dirend; int dirpart =3D 0, apsemi =3D 0; int mapup =3D 0, maplow =3D 0, mapfs =3D 0, mapbs =3D 0; while (strchr (":;/\\<>", sp[1])) { acdebugnl switch (sp[1]) { case ':': dirpart =3D 1; break; case ';': apsemi =3D 1; break; case '/': mapfs =3D 1; break; case '\\': mapbs =3D 1; break; case '<': mapup =3D 1; break; case '>': maplow =3D 1; break; } sp++; } for (pp =3D sp + 1; *pp && *pp !=3D '%'; pp++); ps =3D *pp; *pp =3D 0; e =3D getenv (sp + 1); dirend =3D dp; if (e) { acdebugnl while (*e) { char ec =3D *e++; if (strchr ("\\/:", ec)) dirend =3D dp; if (mapup) ec =3D toupper ((unsigned char) ec); if (maplow) ec =3D tolower ((unsigned char) ec); if (mapfs && ec =3D=3D '\\') ec =3D '/'; if (mapbs && ec =3D=3D '/') ec =3D '\\'; *dp++ =3D ec; } } if (dirpart) dp =3D dirend; if (apsemi && e) *dp++ =3D ';'; if (ps =3D=3D 0) break; sp =3D pp + 1; } } else *dp++ =3D *sp++; } *dp++ =3D 0; printf ("putenv %s \n", tb2); putenv (tb2); } } } free (file); } } } int main (int argc , char * argv[] ) { printf("TEST 1: This app is %s\n", argv[0]); test_environment_file(argv[0], 0x0000); printf("TEST 2: This app is %s\n", argv[0]); test_environment_file(argv[0], 0x1000); return 0; } -------------------------------------------------- CODE END = ----------------- On Mon, 9 Jul 2001, Andrew Cottrell wrote: > 1) On the WIN98 PC the DOS set command does not show an environment > variable called DJDIR, but it shows up when I display all of the > environment variables as indicated in the sample app This is expected behavior: DJDIR is computed and set by the startup code = of each DJGPP program. That's why you only see it inside a program, and = in any shells spawned by a program, but not outside. > 2) On the WIN 2000 PC the DOS set command does not show an environment > variable called DJDIR and neither does the sample app show it in the > environment array. That is the reason for the problem with RHIDE. > Any ideas on what I should do next or where to look? You should look at the startup code, specifically at the code in the = file=20 src/libc/crt0/c1loadef.c. This is the code which reads the djgpp.env=20 file and sets DJDIR when it reads this line from djgpp.env: DJDIR=3D%:/>DJGPP% Something is wrong there when the program runs on Windows 2000. (If you = need to understand the cryptic syntax of djgpp.env, read the section=20 "DJGPP.ENV" in the Info file kb.info.) Thanks for working on this. Btw, you might wish to redirect this discussion to the djgpp-workers AT delorie DOT com mailing list, where all the DJGPP developers are subscribed. ------=_NextPart_000_0009_01C10998.6BA307D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
 
I checked out the code as Eli suggested = and traced=20 a quirk (I do not know enough about the LFN API to call it a bug) using = Ralph=20 Browns Interrupt List 6.1. I have attached the app that I used for the=20 investigation (only the final version). Sorry for including such a large = code=20 snippet, but I thought that this would help, let me know what I should = do in the=20 future so as not to cause any problems.
 
The quirk I found was that if I remove = the "|=20 0x1000" in the code as commented then the DJDIR environment = variable is=20 inserted into the app's environment on Windows 2000. It made no = difference on=20 the WIN 98SE box that I used to compile the app on if it was included or = not.=20
 
What does the 0x1000 bit do? It is = unused in=20 Ralph's list as indicated in the following table (interrupt.h=20 file):
Bitfields for Windows95 file = access/sharing=20 modes:
Bit(s)  Description     (Table=20 01782)
 2-0    file access=20 mode
        000=20 read-only
        001=20 write-only
        010=20 read-write
        100 read-only, = do not=20 modify file's last-access time
 6-4    file = sharing=20 modes
 7      no-inherit=20 flag
 8      do not buffer data = (requires that=20 all reads/writes be exact=20 physical
         =20 sectors)
 9      do not compress file = even if=20 volume normally compresses files
 10     use = alias=20 hint in DI as numeric tail for short-name alias
 12-11  = unused???=20 (0)
 13     return error code instead of = generating=20 INT 24h if critical=20 error
          while = opening=20 file
 14     commit file after every write=20 operation
 
 
The output from Windows 2000 is =
TEST 1: This app is=20 i:/dj204/contrib/test/main.exe
djgpp_var  = D:/DJGPP/DJGPP.ENV
main.c=20 46
main.c 90 D:/DJGPP/DJGPP.ENV
djgpp_env  5
112 116 122 = 177 210=20 210 210 241 putenv  DJDIR=3Dd:/djgpp
177 186 putenv =20 USER=3Ddosuser
177 186 putenv  GROUP=3Droot
177 186 241 = putenv =20 TMPDIR=3Dd:/djgpp/tmp
177 186 241 putenv =20 EMU387=3Dd:/djgpp/bin/emu387.dxe
177 186 177 186 241 putenv =20 TEXMFMAIN=3Dd:/djgpp/share/texmf
177 186 241 putenv =20 GO32STUB=3Dd:/djgpp/bin/stubify.exe
TEST 2: This app is=20 i:/dj204/contrib/test/main.exe
djgpp_var  = D:/DJGPP/DJGPP.ENV
main.c=20 46
87 D:/DJGPP/DJGPP.ENV, error no (register AX) =3D = 0x57djgpp_env =20 -1
Any ideas on what I should do next? = Is it worth performing a test and remove all of = the " |=20 0x1000" from the LFN functions and re-compile the DJGPP CVS 2.04 tarball = and=20 test again?
 
If you need to send me an email then = remove then=20 remove the .oz from the email address.
 
Thanks,
Andrew
 
 
-------------------------------------------------- CODE START=20 -----------------
#include <stdlib.h>
#include=20 <unistd.h>
#include <crt0.h>
#include=20 <sys/stat.h>
#include <stdio.h>
#include=20 <stubinfo.h>
#include <dir.h>
#include=20 <limits.h>
#include <dpmi.h>
#include=20 <errno.h>
#include <libc/dosio.h>
#include=20 <sys/fsext.h>
#include <go32.h>
#include=20 <libc/stubs.h>
#include <string.h>
#include=20 <fcntl.h>
#include <io.h>
#include = <dos.h>
 

#define acprintf(A,B) printf("%s %d " A " \n",=20 __FILE__,__LINE__,B)
#define acdebug printf("%s %d=20 \n",__FILE__,__LINE__);
#define acdebugnl printf("%d = ",__LINE__);
 
int ac_open (const char *filename, int oflag, int = use_fat32)
{
 =20 __dpmi_regs r;
  int rv;
  int use_lfn =3D = _USE_LFN;
 
  if (filename =3D=3D 0)
   =20 {
      acdebug errno =3D=20 EINVAL;
      return = -1;
   =20 }
 
  if (__FSEXT_call_open_handlers (__FSEXT_open, &rv,=20 &filename))
    = {
     =20 acdebug return rv;
    }
 
  if (use_lfn)
   =20 {
      = acdebug
     =20 r.x.ax =3D 0x716c;
#if 1
      r.x.bx =3D = (oflag=20 & 0xff) | use_fat32; /* 0x1000 is FAT32 extended size.=20 */
#else
ORIGINAL LINE --      r.x.bx =3D = (oflag=20 & 0xff) | 0x1000; /* 0x1000 is FAT32 extended size.=20 */
      r.x.bx =3D (oflag & 0xff) = ; /*=20 0x1000 is FAT32 extended size. = */
#endif
     =20 r.x.dx =3D 1;  /* Open existing file=20 */
      r.x.si =3D = __tb_offset;
   =20 }
  else
    = {
     =20 acdebug
      if (7 <=3D _osmajor = &&=20 _osmajor < 10)
 {
  =20 acdebug
          r.x.ax = =3D=20 0x6c00;
   r.x.bx =3D (oflag & 0xff) | 0x1000; /* = 0x1000 is=20 FAT32 extended size. */
   /* FAT32 extended size flag = doesn't help=20 on WINDOZE 4.1 (98). It
 
      seems it has a bug which only lets = you=20 create these big files
      if LFN is = enabled.=20 */
   r.x.dx =3D 1;  /* Open existing file=20 */
   r.x.si =3D=20 __tb_offset;
 }
     =20 else
 {
  =20 acdebug
          r.h.ah = =3D=20 0x3d;
   r.h.al =3D oflag;
   r.x.dx =3D=20 __tb_offset;
 }
    }
  r.x.cx =3D = 0;
 =20 r.x.ds =3D __tb_segment;
  _put_path (filename);
  = __dpmi_int=20 (0x21, &r);
  if (r.x.flags & 1)
 =20 {
      errno =3D __doserr_to_errno=20 (r.x.ax);
      printf("%d %s, error no = (register=20 AX) =3D 0x%X",__LINE__, filename, = r.x.ax);
     =20 return -1;
  }
  acprintf("%s",filename);
 =20 __file_handle_set (r.x.ax, O_BINARY);
  return = r.x.ax;
}
 
void test_environment_file (char *app_name, int = use_fat32)
{
 =20 int djgpp_env;
  char *djgpp_var =3D getenv ("DJGPP");
 
  printf ("djgpp_var  %s \n", djgpp_var);
  if=20 (djgpp_var)
    {
      = djgpp_env=20 =3D ac_open(djgpp_var, O_RDONLY, = use_fat32);
     =20 printf ("djgpp_env  %d \n", djgpp_env);
 
      if (djgpp_env >=3D=20 0)
 {
   char *file;
   char = base[PATH_MAX],=20 *bp, *a0p, *tb;
   int this_prog =3D 1;
   int = fsize =3D=20 lseek (djgpp_env, 0L, SEEK_END);
  =20 acdebugnl
          file = =3D (char=20 *) malloc (fsize + 2);
   if (file =3D=3D=20 0)
     return;
  =20 acdebugnl
          = lseek=20 (djgpp_env, 0L, 0);
   _read (djgpp_env, file,=20 fsize);
   _close (djgpp_env);
   if = (file[fsize - 1]=20 =3D=3D '\n')
     = {
      =20 acdebugnl
          =    =20 file[fsize] =3D 0;
     }
  =20 else
     = {
      =20 acdebugnl
          =    =20 file[fsize] =3D '\n';
       file[fsize = + 1] =3D=20 0;
     }
   tb =3D file;
 
   base[0] =3D '[';
   bp =3D = app_name;
  =20 for (a0p =3D bp; *a0p; a0p++)
     if (strchr=20 ("\\/:", *a0p))
       bp =3D = a0p +=20 1;
   for (a0p =3D base + 1; *bp && *bp !=3D=20 '.';)
     *a0p++ =3D tolower ((unsigned char)=20 *bp++);
   *a0p++ =3D ']';
   *a0p++ =3D = 0;
 
   bp =3D tb;
   while = (1)
    =20 {
       tb =3D=20 bp;
       while (*tb && (*tb = =3D=3D '\n'=20 || *tb =3D=3D = '\r'))
  tb++;
       bp=20 =3D tb;
       while (*bp && = *bp !=3D '\n'=20 && *bp !=3D=20 '\r')
  bp++;
       if = (*bp =3D=3D=20 0)
  break;
       *bp++ = =3D=20 0;
       if (tb[0] =3D=3D 0 || tb[0] = =3D=3D=20 '#')
        =20 continue;
       if (tb[0] =3D=3D=20 '[')
  {
    char *p =3D bp - 2;
 
    /* Some losers leave trailing blanks after=20 "[foo]".  */
    while (p > tb && (*p = =3D=3D ' '=20 || *p =3D=3D '\t'))
      = p--;
   =20 *++p =3D 0;
    if (strcmp (tb, base) =3D=3D=20 0)
      this_prog =3D = 1;
   =20 else
      this_prog =3D=20 0;
  }
      =20 else
  {
    if=20 (this_prog)
     =20 {
        char *buf =3D alloca=20 (fsize);
        char *tb2 =3D=20 buf;
        char *sp =3D tb, *dp = =3D=20 tb2;
        acdebugnl while (*sp = !=3D '=3D'=20 && *sp !=3D '\n' && *sp)
   *dp++ =3D=20 *sp++;
        if (*sp =3D=3D '\n' = || *sp =3D=3D=20 '\0')
   {
     tb =3D=20 sp;
    =20 continue;
   }
      &= nbsp;=20 if (*tb2 =3D=3D '+') /* non-overriding=20 */
   {
     acdebugnl * dp =3D = 0;
     tb2++;
     if = (getenv=20 (tb2))
       continue; /* while = scanning=20 bytes = */
   }
       =20 *dp++ =3D *sp++; /* copy the '=3D'=20 */
        while=20 (*sp)
   {
     if (*sp =3D=3D=20 '%')
      =20 {
         char=20 *pp;
         if (sp[1] = =3D=3D=20 '%')
    {
      = *dp++ =3D=20 '%';
      sp +=3D=20 2;
    }
      &n= bsp; =20 else
    {
      char = ps, *e,=20 *dirend;
      int dirpart =3D 0, apsemi =3D = 0;
      int mapup =3D 0, maplow =3D 0, = mapfs=20 =3D
        0, mapbs =3D=20 0;
      while (strchr (":;/\\<>",=20 sp[1]))
       =20 {
         =20 acdebugnl
          =             &= nbsp;           &n= bsp;  =20 switch=20 (sp[1])
     {
    &nb= sp;case=20 ':':
       dirpart =3D=20 1;
      =20 break;
     case=20 ';':
       apsemi =3D=20 1;
      =20 break;
     case=20 '/':
       mapfs =3D=20 1;
      =20 break;
     case=20 '\\':
       mapbs =3D=20 1;
      =20 break;
     case=20 '<':
       mapup =3D=20 1;
      =20 break;
     case=20 '>':
       maplow =3D=20 1;
      =20 break;
     }
    &nbs= p;    =20 sp++;
       =20 }
      for (pp =3D sp + 1; *pp && = *pp !=3D '%';=20 pp++);
      ps =3D=20 *pp;
      *pp =3D=20 0;
      e =3D getenv (sp +=20 1);
      dirend =3D=20 dp;
      if=20 (e)
       =20 {
         =20 acdebugnl
          =             &= nbsp;           &n= bsp;  =20 while=20 (*e)
     {
     =  =20 char ec =3D *e++;
       if (strchr=20 ("\\/:", ec))
         = dirend=20 =3D dp;
       if=20 (mapup)
         ec =3D = toupper=20 ((unsigned char) ec);
       if=20 (maplow)
         ec =3D = tolower=20 ((unsigned char) ec);
       if (mapfs=20 && ec =3D=3D = '\\')
         ec =3D=20 '/';
       if (mapbs && ec = =3D=3D=20 '/')
         ec =3D=20 '\\';
       *dp++ =3D=20 ec;
     }
     &= nbsp; =20 }
      if=20 (dirpart)
        dp =3D=20 dirend;
      if (apsemi &&=20 e)
        *dp++ =3D=20 ';';
      if (ps =3D=3D=20 0)
       =20 break;
      sp =3D pp +=20 1;
    }
      =20 }
     = else
       *dp++=20 =3D = *sp++;
   }
      &nbs= p;=20 *dp++ =3D 0;
        printf = ("putenv =20 %s \n", tb2);
        putenv=20 (tb2);
     =20 }
  }
     }
   free=20 (file);
 }
    }
}
 
int main (int argc , char * argv[] )
{
  printf("TEST 1: = This=20 app is %s\n", argv[0]);
  test_environment_file(argv[0],=20 0x0000);
  printf("TEST 2: This app is %s\n", = argv[0]);
 =20 test_environment_file(argv[0], 0x1000);
  return 0;
}
-------------------------------------------------- CODE END=20 -----------------
 
 
 
On Mon, 9 Jul 2001, Andrew Cottrell=20 wrote:
 
> 1) On the WIN98 PC the DOS set = command does=20 not show an environment
> variable called DJDIR, but it shows up = when I=20 display all of the
> environment variables as indicated in the = sample=20 app
 
This is expected behavior: DJDIR is = computed and=20 set by the startup code
of each DJGPP program.  That's why you = only see=20 it inside a program, and
in any shells spawned by a program, but not = outside.
 
> 2) On the WIN 2000 PC the DOS set = command does=20 not show an environment
> variable called DJDIR and neither does = the=20 sample app show it in the
> environment array.
 
That is the reason for the problem with = RHIDE.
 
> Any ideas on what I should do next = or where to=20 look?
 
You should look at the startup code, = specifically=20 at the code in the file
src/libc/crt0/c1loadef.c.  This is the = code=20 which reads the djgpp.env
file and sets DJDIR when it reads this = line from=20 djgpp.env:
 
   = DJDIR=3D%:/>DJGPP%
 
Something is wrong there when the = program runs on=20 Windows 2000.  (If you
need to understand the cryptic syntax of = djgpp.env, read the section
"DJGPP.ENV" in the Info file=20 kb.info.)
 
Thanks for working on = this.
 
Btw, you might wish to redirect this = discussion to=20 the
djgpp-workers AT delorie DOT com=20 mailing list, where all the DJGPP developers
are=20 subscribed.
------=_NextPart_000_0009_01C10998.6BA307D0--