Mail Archives: djgpp/2000/11/10/15:53:35
> From: ad354 AT FreeNet DOT Carleton DOT CA (James Owens)
> Newsgroups: comp.os.msdos.djgpp
> Date: 10 Nov 2000 18:29:18 GMT
>
> #if (!defined(__GO32__) && !defined(__EMX__))
>
> ...
>
> /**************************/
> /* Function volumelabel() */
> /**************************/
>
> static int volumelabel(newlabel)
> char *newlabel;
> ...
>
> (I'm still not sure how this is excluded from the DJGPP compile.)
DJGPP defines __GO32__, that's why the above gets excluded.
> static int volumelabel(char *name)
> {
> int fd;
> return _dos_creat(name, FA_LABEL, &fd) ? fd : _dos_close(fd);
> }
> ...
>
> A printf inserted here shows up.
If the DJGPP version calls _dos_creat to create a label, it looks like
a small wonder that it fails when there's already a label on the disk,
right?
You could try rewriting the code which uses intdosx like I suggested
in my previous message; perhaps calling function 17h is the solution,
and whoever used _dos_creat simply didn't know how to call such
functions from a DJGPP program?
> I was also puzzled by the __GO32__ condition for the
> function, rather than the DJGPP condition I was expecting.
It probably got left over from early DJGPP versions. The symbol
__DJGPP__ was only added in DJGPP v2.0.
- Raw text -