From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Detecting longfilename support.. Date: Mon, 10 Feb 1997 18:16:04 GMT Organization: Oxford University Lines: 27 Message-ID: <32ff64ab.14004877@news.ox.ac.uk> References: NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 10 Feb 1997 13:34:38 +0100, Andy Eskilsson wrote: >Is it possible, during runtime, to detect if long filenames is >supported (the LFN=y is set in the djgpp.env file) > >And how :-) Compile and run this: #include int main(void) { int lfn=(toupper(getenv("LFN")[0])=='Y'); if (lfn) printf("Long filenames available.\n"); else printf("Long filenames not available.\n"); return(lfn); } Hope this helps, George Foot