[vlc-devel] Re: msvc v6 fixes for src/extras/libc.c
Brian Robb
vascy at hotmail.com
Mon Sep 5 20:21:22 CEST 2005
> msvc 6 fixes:
>
> At the top of include/vlc_common.h add:
>
> #ifndef VLC_COMMON_H
> #define VLC_COMMON_H
>
> And at the bottom of include/vlc_common.h add:
>
> #endif // VLC_COMMON_H
>
> Do the same for msvc/config.h
>
> #ifndef CONFIG_H
> #define CONFIG_H
>
> And:
>
> #endif // CONFIG_H
>
> Then to src/extras/libc.c add (at around line 32):
>
> #include <vlc_common.h>
>
> It'll then compile in msvc v6 :)
>
I don't understand this one.
vlc_common.h is automatically included by vlc/vlc.h as long as __VLC__ is
defined... and __VLC__ is defined in msvc/libvlc.dsp.
src/extras/libc.c uses types like int64_t, which msvc doesn't have.
vlc_common.h defines these typedefs, so including it fixes the build when
compiling src/extras/libc.c
Adding the:
#ifndef VLC_COMMON_H
#define VLC_COMMON_H
...
#endif // VLC_COMMON_H
Around the file stops msvc from trying to compile it twice.
Perhaps I could just define __VLC__ before compiling src/extras/libc.c
but adding the include seems more natural to me.
There isn't any harm in adding the ifndef's around the header files
though... :)
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list