[vorbis-dev] win32sdk shared memory issue -- proposed change of code

Dimitry Andric dim at xs4all.nl
Thu Oct 18 14:51:37 PDT 2001



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2001-10-17 at 20:00:38 Chris Wolf wrote:

CW> #if defined(_MSC_VER) && defined(DLL_IMPORT)
CW> # define EXTERN _declspec(dllimport) extern
CW> #else
CW> # define EXTERN extern
CW> #endif

CW> EXTERN vorbis_func_time      *_time_P[];
CW> EXTERN vorbis_func_floor     *_floor_P[];
CW> EXTERN vorbis_func_residue   *_residue_P[];
CW> EXTERN vorbis_func_mapping   *_mapping_P[];

I propose changing that to:

#if defined(_WIN32) && defined(VORBISDLL_IMPORT)
# define EXTERN __declspec(dllimport) extern
#else
# define EXTERN extern
#endif

EXTERN vorbis_func_time      *_time_P[];
EXTERN vorbis_func_floor     *_floor_P[];
EXTERN vorbis_func_residue   *_residue_P[];
EXTERN vorbis_func_mapping   *_mapping_P[];

The defined(_WIN32) is because MSVC is not the only Win32 compiler,
and almost all other Win32 compilers grok the __declspec stuff anyway,
for compatibility reasons. (Btw, according to the Microsoft docs, it's
__declspec, not _declspec.)

The defined(VORBISDLL_IMPORT) is because DLL_IMPORT is simply too
generic. There might be more imported DLLs in a Win32 project. ;-)

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: PGP 6.5i
Comment: http://www.gn.apc.org/duncan/stoa_cover.htm

iQA/AwUBO89A5rBeowouIJajEQKOGwCeLvDeip82w+TIa6zW88LgCXh3XNAAoIZo
jDSOof7sVycAqGEvq/vPciTM
=K77F
-----END PGP SIGNATURE-----

--- >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 'vorbis-dev-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 Vorbis-dev mailing list