[tremor] Re: inline'd functions under MSVC and poor tremor output

Jeff Pike jeffppike at yahoo.com
Wed Sep 4 13:13:14 PDT 2002



Thanks.  Any word on why the tremor output differs significantly from the oggdec output?
Jeff
 Dimitry Andric wrote:-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2002-09-04 at 16:41:07 Jeff Pike wrote:

<p>JP> In order to get the tremor library/example to compile under MSVC,
JP> I had to change all the functions that were tagged as 'inline'
JP> functions to '__inline', since I was compiling as a 'C' project.

I've also encountered this problem when building with MSVC, but I saw
the following piece of code in Tremor/os.h:

#ifndef _V_IFDEFJAIL_H_
# define _V_IFDEFJAIL_H_

# ifdef __GNUC__
# define STIN static __inline__
# elif _WIN32
# define STIN static __inline
#else
# define STIN static
#endif

Obviously, this is meant to be used for conforming to the different
compiler syntaxes regarding inline functions in C. Note that this is
certainly NOT ANSI C, as the README file suggests. :)

So I just added an #include "os.h" to the Tremor/misc.h file, and
then replaced all instances of "static inline" by "STIN" in all
Tremor/* files. This should make it nicely portable between gcc and
MSVC. For the interested, I've also attached a patch for this.

Cheers,
- --
Dimitry Andric 
PGP Key: http://www.xs4all.nl/~dim/dim.asc
Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3
Lbh ner abj va ivbyngvba bs gur QZPN

-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt http://www.ipgpp.com/
Comment: http://duncan.gn.apc.org/stoa_cover.htm

iQA/AwUBPXZJBLBeowouIJajEQIDYACdFtJX5EhZpc6S6+zj7pX0at4fdWYAoI6/
zPajkyKpZI62y90qa8qHhO/0
=hjLS
-----END PGP SIGNATURE----- > ATTACHMENT part 2 application/octet-stream name=Tremor.diff 

<p>---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list