Thanks for your response.

I tried adding the LFN macro however I still only have a short file name
created in the hard disk.

File:
#define __WATCOM_LFN__

#include <stdio.h>

void main(void)
{
    FILE *fptr = fopen("e:\\aerosystems.txt", "w");

    fprintf(fptr, "Genesys\n");
    fclose(fptr);
}     // END main()

Output:
[image: image.png]

Whether the DOSLFN driver is still visible in the DOS4GW environment?

Could anyone help to create a long file name using a simple C program in
FreeDOS?

Thanks,
Anand


On Tue, Aug 4, 2020 at 10:37 AM TK Chia <u1049321...@caramail.com> wrote:

> Hello Anand,
>
> > I wrote a small program in C to create a file with a long file name as
> > follows.
> >
> > void main(void)
> > {
> >      FILE *fptr = fopen("e:\\aerosystems.txt", "w");
> >
> >      fprintf(fptr, "Genesys\n");
> >      fclose(fptr);
> > }     // END main()
> >
> > And then I compiled using the Watcom compiler:
>
> It seems the Watcom libraries do not use long file name support by
> default.  Perhaps you can try to see if LFNs work if you define a macro
> __WATCOM_LFN__ before including system header files?
>
> #define __WATCOM_LFN__
> #include <stdio.h>
> ...
>
> Thank you!
>
> --
> https://github.com/tkchia
>
>
> _______________________________________________
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
>
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to