[PD] [comport] for windows

Thomas Grill gr at grrrr.org
Fri Oct 28 15:17:19 CEST 2005


Hi all,

>>Winfried Ritsch wrote:
>>
>>The OS is Windows 2000, the comport.c was compiled with MS VS6.0 using
>>the makefile.
>>    
>>
>for WINDOWS 2000 i had a #ifdef WIN2000 in my code which wasnt in CVS, i just 
>committed now. This  means the    FILE_FLAG_OVERLAPPED at open is not used. I 
>never  found out why but then WINDOWS2000 worked,
>  
>
i have no insight into the comport external but a #define WIN2000 seems 
odd to me.
To differentiate between Windows and linux there are other preprocessor 
defines like _WIN32 which should be defined for every Windows-based 
compiler (or __linux__ respectively).
To make a compilation specific for different Windows versions, like 
Win95, 2000, XP the preprocessor definitions WINVER and _WIN32_WINNT 
should be used (see 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/using_the_windows_headers.asp) 
which also let the respective Windows API functions be included.
There are other available definitions for MacOS (9/X CFM/MachO) and linux.

It would be great if the PD (as already motivated by James Tittle, as i 
think to recall) and external sources could use these symbols for 
automatic configuration.

best greetings,
Thomas





More information about the Pd-list mailing list