From: "Alex Vinokur" Newsgroups: comp.os.msdos.djgpp Subject: __DJGPP_MINOR__ Date: Sun, 10 Nov 2002 21:47:56 +0200 Lines: 88 Message-ID: References: NNTP-Posting-Host: pop03-2-ras2-p47.barak.net.il (212.150.98.47) X-Trace: fu-berlin.de 1036957702 11462129 212.150.98.47 (16 [79865]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Eli Zaretskii" wrote in message news:Pine DOT SUN DOT 3 DOT 91 DOT 1021027161818 DOT 3459A-100000 AT is... > > On 27 Oct 2002, Rafal 'Raf256' Maj wrote: > > > I know about __GNUC__, __DJGPP__, are there more informations like this ? > > __DJGPP_MINOR__ might also be of interest. > > What other info are you interested in? Is it only versions of various > tools or something else? 1. About __DJGPP_MINOR__ . Here is some program : --------- C++-code : BEGIN --------- // File t1.cpp #include using namespace std; int main() { #ifdef __GNUC__ cout << "GNU gcc : " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << endl; #endif #ifdef __DJGPP__ cout << "DJGPP : " << __DJGPP__ << "." << __DJGPP_MINOR__ << endl; #endif return 0; } --------- C++-code : END ----------- --------- Compilation & Run : BEGIN --------- % gpp t1.cpp GNU gcc : 3.1.0 DJGPP : 2.3 ### So, __DJGPP_MINOR__ == 3 % redir -eo gpp -v t1.cpp | C:\cygwin\bin\tr.exe " " "\n" | grep "\-D" | sort -D__DEPRECATED -D__DJGPP__=2 -D__DJGPP__=2 -D__EXCEPTIONS -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__GNUG__=3 -D__GO32__ -D__GO32__ -D__GXX_ABI_VERSION=100 -D__i386 -D__i386__ -D__MSDOS__ -D__MSDOS__ -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__tune_i586__ -D__tune_pentium__ -D__unix__ -D__unix__ -DDJGPP=2 -DGO32 -Di386 -DMSDOS -Dunix ### __DJGPP_MINOR__ is absent in a list above. --------- Compilation & Run : END ----------- Where does my program (t1.cpp) take __DJGPP_MINOR__ from ? 2. Another question. We see that the following values are defined : __MSDOS__ and __unix__. How can a program know where it is compiled : on MSDOS, on UNIX, on Windows 95/98/2000 etc. Thanks in advance. ================== Alex Vinokur mailto:alexvn AT go DOT to http://go.to/alexvn ==================