[vorbis-dev] Bug fix, win32 stuff

David Burnett vargol at bigfoot.com
Tue May 2 12:02:21 PDT 2000



>Okay, so after all this discusison I am still confused
>about what we have decided.  So to make it ultra clear:
>
>(1) Public include file (os_types.h): I should ditch
>this file and make the types be defined in the project
>file?  Or leave it?
>
Well I think that all OS specific stuff should be isolated
as much as possible, and kept in one header if possible,
which is included where necessary, basically a config.h 
header in all but name. This file would be basically
a list of #ifdef's and #ifndef's which are ugly, but
more or less unavoidable is cross platform source
(GIMP's config.h is huge :)

At the moment os.h does this, mostly because it #includes 
os_types.h. Replacing the #include of os_types.h in codec.h
with one for os.h works when I #ifndef out the #define of rint,
which POSIX compatitble OS's do not need anyway, and add a 
#include <inttypes.h>  wrapped in a #ifdef __BEOS__ . This means
that os.h and os_types.h could easily ne merged into one header.

Now to me this seems to be the most sensible way to do things.
Its much easier for a none gcc, autoconf, configure, makefile
expert (like me :) to follow have than having a load of -D's 
in the makefiles. As long as the #ifdefs are done in a sensible
way (either a #ifdef for each OS, or nested #ifdef's) it should
be easy to add new OS's.

Incidently reason that int64_t et al are not defined by the configure
script on BeOS (and persumably every other OS) is because none 
of the makefile.in files have @DEFS@ in them, and, at least on BeOS,
if you add them the $DEFS appear to be broken anyway.

Hope I didn't ramble to much... 

Dave

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



More information about the Vorbis-dev mailing list