[Bug 170] New: Improved support for MSVC

View: New views
4 Messages — Rating Filter:   Alert me  

[Bug 170] New: Improved support for MSVC

by Bugzilla from bugzilla-daemon@xine-project.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.xine-project.org/show_bug.cgi?id=170

           Summary: Improved support for MSVC
           Product: xine-lib
           Version: Mercurial 1.1
          Platform: i386/x86
        OS/Version: Windows
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: Core / Backend
        AssignedTo: xine-bugs@...
        ReportedBy: carlo.bramix@...


I updated the compatibility of XINE-LIB with Microsoft Visual Studio.
Attached patch fixes some errors, but other fixes may be also required for
these reasons:
* depending on C compiler version, it is not be possible to compile some
sources with variable declaration mixed with code (typical c++ style), or
better it can do it but it needs to fully activate C++ compiler and change
filename extension form "c" to "cpp" (if I remember right, MSVC5 and MSVC6 had
this limit).
* There are surely some fixes to do to the project files: new projects for new
file formats, remove projects no longer supported, new files to add to existing
projects, remove no more existing files. I think it is also required to link
XINE with msvcrt instead of static C library: this will make possible to share
objects with MINGW, compiled code will be much more slim and secure. For doing
this, add "_DLL" macro declaration to command line and specify required
libraries for each DLL. The MSVC express (that you can get without costs from
download center at Microsoft's site) uses XML based projects that are
incompatible with older workspaces.

Description of changes:

lib/gettimeofday.c
- Why including WINSOCK.H? We just need WINDOWS.H here for all toolchains!

lib/os_internal.h
- updated support for asprintf with MSVC
- emulate strcasecmp() and vsnprintf() with _stricmp() and _vsnprintf().

src/demuxers/demux_aiff.c
- Compilation hangs on 0.0/0.0 because the compiler detected the nonsense.
According to a paper into MSDN, this can be done with sqrt(-1.0).
- ldexp() function really wants a signed type.

src/demuxers/demux_flac.c
- Check for malloc.h.

src/demuxers/demux_real.c
- Check for malloc.h and little fix on malloc and chunk_size calculation.

src/input/libdvdnav/dvd_reader.c
- Check for dirent.h

src/libmad/fixed.h
- __forceinline modifier exists only on later version of MSVC.

src/xine-engine/alphablend.c
- Removed GNU style in favor of XINE_PACKED macro.

src/xine-engine/configfile.c
- NULL pointers have been explicitely added at the end of a table.

src/xine-engine/load_plugins.c
Instead of direct constant 1ULL, I modified it with macro UINT64_C.

src/xine-engine/scratch.c
- Removed GNU style in favor of XINE_FORMAT_PRINTF macro.

src/xine-engine/scratch.h
- Removed GNU style in favor of XINE_FORMAT_PRINTF macro.

src/xine-utils/attributes.h
- avoid declaration of ATTR_ALIGN under MSVC.

src/xine-utils/monitor.c
- MSVC complained about a memset to a const object and all "long long"
variables that are GNU only. I fixed it by grouping the fields into a structure
and now even GCC is more happy.

win32/libxine.def
- Added missing functions and fixed some existing ones into exported DLL.

win32/libxinesupport.def
- Added missing functions and fixed some existing ones into exported DLL.


INSTRUCTIONS:
1) Apply the patch to the sources by using patch into attachment 1.
2) delete file named /win32/config.h, the one into /include/config.h will be
ok.
3) attachment 2 is an updated configure.h for MSVC (normally generated by
autoconf), copy it as /win32/configure.h


Sincerely,

Carlo Bramini.


--
Configure bugmail: http://bugs.xine-project.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xine-bugs mailing list
xine-bugs@...
https://lists.sourceforge.net/lists/listinfo/xine-bugs

[Bug 170] Improved support for MSVC

by Bugzilla from bugzilla-daemon@xine-project.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.xine-project.org/show_bug.cgi?id=170





--- Comment #1 from Carlo Bramini <carlo.bramix@...>  2008-10-05 14:37:49 UTC ---
Created an attachment (id=90)
 --> (http://bugs.xine-project.org/attachment.cgi?id=90)
Fix for this bug.


--
Configure bugmail: http://bugs.xine-project.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xine-bugs mailing list
xine-bugs@...
https://lists.sourceforge.net/lists/listinfo/xine-bugs

[Bug 170] Improved support for MSVC

by Bugzilla from bugzilla-daemon@xine-project.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.xine-project.org/show_bug.cgi?id=170





--- Comment #2 from Carlo Bramini <carlo.bramix@...>  2008-10-05 14:39:02 UTC ---
Created an attachment (id=91)
 --> (http://bugs.xine-project.org/attachment.cgi?id=91)
Fix for this bug.


--
Configure bugmail: http://bugs.xine-project.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xine-bugs mailing list
xine-bugs@...
https://lists.sourceforge.net/lists/listinfo/xine-bugs

[Bug 170] Improved support for MSVC

by Bugzilla from bugzilla-daemon@xine-project.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.xine-project.org/show_bug.cgi?id=170





--- Comment #3 from Darren Salt <linux@...>  2009-10-13 21:21:47 UTC ---
I've extracted some bits (#include guards, __attribute__ fixups, profiler "long
long"/struct changes) from this patch and applied them separately. Could you
check the rest (split up as needed; and I'd much prefer to have the patch(es)
include the two win32/config*.h files which are touched by this) and re-submit?

--
Configure bugmail: http://bugs.xine-project.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
xine-bugs mailing list
xine-bugs@...
https://lists.sourceforge.net/lists/listinfo/xine-bugs