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

Dimitry Andric dim at xs4all.nl
Wed Sep 4 11:55:04 PDT 2002


-----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 <dim at xs4all.nl>
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-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Tremor.diff
Type: application/octet-stream
Size: 7033 bytes
Desc: Tremor.diff
Url : http://lists.xiph.org/pipermail/tremor/attachments/20020904/23cb6daf/Tremor.obj


More information about the Tremor mailing list