www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/04/29/19:08:07

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10204292307.AA18139@clio.rice.edu>
Subject: Re: _open LFN & Win 2K Bug (Was Re: a bug)
To: acottrel AT ihug DOT com DOT au (Andrew Cottrell)
Date: Mon, 29 Apr 2002 18:07:16 -0500 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <003c01c1ef6a$d6ed91f0$0102a8c0@acceleron> from "Andrew Cottrell" at Apr 29, 2002 08:43:57 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Okay, I still get the same dos error (123) with my binary on Win XP, so
I guess it's a difference in test programs?  Here's my test program:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dpmi.h>
#include <go32.h>
#include <errno.h>
#include <dos.h>
#include <libc/dosio.h>

#define TEST argv[1]

int main(int argc, char** argv) {
 int i;
 
 if(_USE_LFN)
   printf("Long names are active.\n");
 else
   printf("Long names are *NOT* active.\n");

 if(argc != 2)
   return printf("Usage: test <filename>\n");

 printf("_chmod: 0x%x\n",_chmod(TEST,0));
 
 i = _open(TEST, 0);
 
 if(i == -1) {
   printf("_open %s failed, errno = %d, doserr = %d\n",TEST,errno,_doserrno);
 } else {
   printf("_open %s was successful, handle = %d\n",TEST,i);
   _close(i);
 }

 return 0;
}

- Raw text -


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