gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Re: Diff for libbase under MSVC++ WIn32


From: Tonko Juricic
Subject: [Gnash-dev] Re: Diff for libbase under MSVC++ WIn32
Date: Wed, 19 Nov 2008 22:05:31 -0500

Attached is diff for combined libbase and libamf.

I'm trying to follow some suggestions from Benjamin, in part by
creating gnashconfig.h for MSVC with current content as below:

#ifndef _GNASHCONFIG_H
#define _GNASHCONFIG_H

#if defined(_WIN32) || defined(WIN32)
#ifndef _WIN32
#define _WIN32
#endif
#ifndef WIN32
#define WIN32
#endif
#endif

#if defined(WIN32)

#include <winsock2.h>
// it is convenient to have windows.h included after winsock2.h to
prevent inclusion of winsock.h
#include <windows.h>
#include <io.h> // for ::_read
#include <time.h>

#if defined(_MSC_VER) // Microsoft C/C++

#define DEFAULT_FLASH_PLATFORM_ID "WIN"
#define DEFAULT_FLASH_SYSTEM_OS "Windows"
#define DEFAULT_FLASH_MAJOR_VERSION "9"
#define DEFAULT_FLASH_MINOR_VERSION "0"
#define DEFAULT_FLASH_REV_NUMBER "999"
#define DEFAULT_STREAMS_TIMEOUT 60
#define SYSCONFDIR "."
#define PLUGINSDIR "./"

#else // MingW

#include <unistd.h> // getpid(), ::read
#include <sys/time.h>

#endif

#else // not a Windows system

#include <unistd.h> // getpid(), ::read
#include <netinet/in.h>
#include <sys/time.h>

#endif


#endif //_GNASHCONFIG_H

Eventually, I think this file will be split into 'genuine'
gnashconfig.h and  some sort of platform.h header that will serve to
avoid miriads of existing and future WIN32 conditionals. For ex.
unistd.h tends to be included in many current headers and that works
fine with MingW even on Windows, but not when you use MSVC where
windows.h tends to be widely included or in precompiled header.

Attachment: libbase_libamf.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]