[vorbis-dev] RE: vorbis under win32

Mark Taylor mt at lanl.gov
Tue Nov 16 19:51:26 PST 1999



> 
> Oh, I forgot to ask; does MSVC++ define any symbols that identify it as such?
> (ie, analagous to gcc defining __GNUC__)  I'm currently guessing _WIN32 and
> using that.
> 
> Monty

Hi Monty,

Here's a list of #define's for windows related compilers
people have submitted to LAME, since there are differences
among the many compilers that define _WIN32:
(I forget what EMX is)

#ifdef _WIN32        
#ifdef __EMX__         
#ifdef __BORLANDC__    
#ifdef __CYGWIN__
#ifdef _MSC_VER

One of the "best" examples is writing a binary file to stdout:

    if (!strcmp(bs_filenam, "-")) {
      /* Write to standard output. */
#ifdef __EMX__
      _fsetmode(stdout,"b");
#elif (defined  __BORLANDC__)
      setmode(_fileno(stdout), O_BINARY);
#elif (defined  __CYGWIN__)
      setmode(fileno(stdout), _O_BINARY);
#elif (defined _WIN32)
      _setmode(_fileno(stdout), _O_BINARY);
#endif
      bs->pt = stdout;

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list