CONFIG_WIN32 implies MinGW and Cygwin and possibly more, so use just
CONFIG_MINGW or __MINGW32__ instead. Originally committed as revision 5718 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3dc7174e9d
commit
2f30a81d19
4
Makefile
4
Makefile
@ -124,7 +124,7 @@ wininstaller: all install
|
|||||||
|
|
||||||
# install man from source dir if available
|
# install man from source dir if available
|
||||||
install-man:
|
install-man:
|
||||||
ifneq ($(CONFIG_WIN32),yes)
|
ifneq ($(CONFIG_MINGW),yes)
|
||||||
if [ -f doc/ffmpeg.1 ] ; then \
|
if [ -f doc/ffmpeg.1 ] ; then \
|
||||||
install -d "$(mandir)/man1" ; \
|
install -d "$(mandir)/man1" ; \
|
||||||
install -m 644 $(MANPAGES) "$(mandir)/man1" ; \
|
install -m 644 $(MANPAGES) "$(mandir)/man1" ; \
|
||||||
@ -159,7 +159,7 @@ uninstall-progs:
|
|||||||
rm -f $(addprefix $(bindir)/, $(ALLPROGS))
|
rm -f $(addprefix $(bindir)/, $(ALLPROGS))
|
||||||
|
|
||||||
uninstall-man:
|
uninstall-man:
|
||||||
ifneq ($(CONFIG_WIN32),yes)
|
ifneq ($(CONFIG_MINGW),yes)
|
||||||
rm -f $(addprefix $(mandir)/man1/,$(ALLMANPAGES))
|
rm -f $(addprefix $(mandir)/man1/,$(ALLMANPAGES))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ $(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
|
|||||||
|
|
||||||
$(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
|
$(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
|
||||||
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
|
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
|
||||||
ifeq ($(CONFIG_WIN32),yes)
|
ifeq ($(CONFIG_MINGW),yes)
|
||||||
-lib /machine:i386 /def:$(@:.dll=.def)
|
-lib /machine:i386 /def:$(@:.dll=.def)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ install-libs: $(INSTLIBTARGETS)
|
|||||||
|
|
||||||
install-lib-shared: $(SLIBNAME)
|
install-lib-shared: $(SLIBNAME)
|
||||||
install -d "$(libdir)"
|
install -d "$(libdir)"
|
||||||
ifeq ($(CONFIG_WIN32),yes)
|
ifeq ($(CONFIG_MINGW),yes)
|
||||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
|
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
|
||||||
else
|
else
|
||||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
|
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
|
||||||
@ -85,7 +85,7 @@ install-headers:
|
|||||||
uninstall: uninstall-libs uninstall-headers
|
uninstall: uninstall-libs uninstall-headers
|
||||||
|
|
||||||
uninstall-libs:
|
uninstall-libs:
|
||||||
ifeq ($(CONFIG_WIN32),yes)
|
ifeq ($(CONFIG_MINGW),yes)
|
||||||
-rm -f $(prefix)/$(SLIBNAME)
|
-rm -f $(prefix)/$(SLIBNAME)
|
||||||
else
|
else
|
||||||
-rm -f $(libdir)/$(SLIBNAME_WITH_MAJOR) \
|
-rm -f $(libdir)/$(SLIBNAME_WITH_MAJOR) \
|
||||||
|
6
configure
vendored
6
configure
vendored
@ -1930,8 +1930,7 @@ if test "$x264" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$mingw32" = "yes" ; then
|
if test "$mingw32" = "yes" ; then
|
||||||
echo "#define CONFIG_WIN32 1" >> $TMPH
|
echo "CONFIG_MINGW=yes" >> config.mak
|
||||||
echo "CONFIG_WIN32=yes" >> config.mak
|
|
||||||
echo "HAVE_W32THREADS=yes" >> config.mak
|
echo "HAVE_W32THREADS=yes" >> config.mak
|
||||||
echo "#define HAVE_W32THREADS 1" >> $TMPH
|
echo "#define HAVE_W32THREADS 1" >> $TMPH
|
||||||
echo "#define HAVE_THREADS 1" >> $TMPH
|
echo "#define HAVE_THREADS 1" >> $TMPH
|
||||||
@ -1941,8 +1940,7 @@ if test "$mingw32" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$mingwce" = "yes" ; then
|
if test "$mingwce" = "yes" ; then
|
||||||
echo "#define CONFIG_WIN32 1" >> $TMPH
|
echo "CONFIG_MINGW=yes" >> config.mak
|
||||||
echo "CONFIG_WIN32=yes" >> config.mak
|
|
||||||
echo "#define CONFIG_WINCE 1" >> $TMPH
|
echo "#define CONFIG_WINCE 1" >> $TMPH
|
||||||
echo "CONFIG_WINCE=yes" >> config.mak
|
echo "CONFIG_WINCE=yes" >> config.mak
|
||||||
echo "#ifndef __MINGW32__" >> $TMPH
|
echo "#ifndef __MINGW32__" >> $TMPH
|
||||||
|
10
ffmpeg.c
10
ffmpeg.c
@ -23,7 +23,7 @@
|
|||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "opt.h"
|
#include "opt.h"
|
||||||
|
|
||||||
#ifndef CONFIG_WIN32
|
#ifndef __MINGW32__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
@ -317,7 +317,7 @@ typedef struct AVInputFile {
|
|||||||
int nb_streams; /* nb streams we are aware of */
|
int nb_streams; /* nb streams we are aware of */
|
||||||
} AVInputFile;
|
} AVInputFile;
|
||||||
|
|
||||||
#ifndef CONFIG_WIN32
|
#ifndef __MINGW32__
|
||||||
|
|
||||||
/* init terminal so that we can grab keys */
|
/* init terminal so that we can grab keys */
|
||||||
static struct termios oldtty;
|
static struct termios oldtty;
|
||||||
@ -1896,7 +1896,7 @@ static int av_encode(AVFormatContext **output_files,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_WIN32
|
#ifndef __MINGW32__
|
||||||
if ( !using_stdin && verbose >= 0) {
|
if ( !using_stdin && verbose >= 0) {
|
||||||
fprintf(stderr, "Press [q] to stop encoding\n");
|
fprintf(stderr, "Press [q] to stop encoding\n");
|
||||||
url_set_interrupt_cb(decode_interrupt_cb);
|
url_set_interrupt_cb(decode_interrupt_cb);
|
||||||
@ -3585,7 +3585,7 @@ static void opt_pass(const char *pass_str)
|
|||||||
do_pass = pass;
|
do_pass = pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_WIN32) || defined(CONFIG_OS2)
|
#if defined(__MINGW32__) || defined(CONFIG_OS2)
|
||||||
static int64_t getutime(void)
|
static int64_t getutime(void)
|
||||||
{
|
{
|
||||||
return av_gettime();
|
return av_gettime();
|
||||||
@ -4299,7 +4299,7 @@ int main(int argc, char **argv)
|
|||||||
powerpc_display_perf_report();
|
powerpc_display_perf_report();
|
||||||
#endif /* POWERPC_PERFORMANCE_REPORT */
|
#endif /* POWERPC_PERFORMANCE_REPORT */
|
||||||
|
|
||||||
#ifndef CONFIG_WIN32
|
#ifndef __MINGW32__
|
||||||
if (received_sigterm) {
|
if (received_sigterm) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Received signal %d: terminating.\n",
|
"Received signal %d: terminating.\n",
|
||||||
|
4
ffplay.c
4
ffplay.c
@ -25,7 +25,7 @@
|
|||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL_thread.h>
|
#include <SDL_thread.h>
|
||||||
|
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef __MINGW32__
|
||||||
#undef main /* We don't want SDL to override our main() */
|
#undef main /* We don't want SDL to override our main() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2423,7 +2423,7 @@ int main(int argc, char **argv)
|
|||||||
video_disable = 1;
|
video_disable = 1;
|
||||||
}
|
}
|
||||||
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
|
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
|
||||||
#if !defined(CONFIG_WIN32) && !defined(CONFIG_DARWIN)
|
#if !defined(__MINGW32__) && !defined(CONFIG_DARWIN)
|
||||||
flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 or darwin */
|
flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 or darwin */
|
||||||
#endif
|
#endif
|
||||||
if (SDL_Init (flags)) {
|
if (SDL_Init (flags)) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef __MINGW32__
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1417,7 +1417,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
|
|||||||
* and opened file name in **filename. */
|
* and opened file name in **filename. */
|
||||||
int av_tempfile(char *prefix, char **filename) {
|
int av_tempfile(char *prefix, char **filename) {
|
||||||
int fd=-1;
|
int fd=-1;
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef __MINGW32__
|
||||||
*filename = tempnam(".", prefix);
|
*filename = tempnam(".", prefix);
|
||||||
#else
|
#else
|
||||||
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
|
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
|
||||||
@ -1428,7 +1428,7 @@ int av_tempfile(char *prefix, char **filename) {
|
|||||||
av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n");
|
av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef __MINGW32__
|
||||||
fd = open(*filename, _O_RDWR | _O_BINARY | _O_CREAT, 0444);
|
fd = open(*filename, _O_RDWR | _O_BINARY | _O_CREAT, 0444);
|
||||||
#else
|
#else
|
||||||
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
|
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifndef CONFIG_WIN32
|
#ifndef __MINGW32__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#else
|
#else
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#define open(fname,oflag,pmode) _open(fname,oflag,pmode)
|
#define open(fname,oflag,pmode) _open(fname,oflag,pmode)
|
||||||
#endif /* CONFIG_WIN32 */
|
#endif /* __MINGW32__ */
|
||||||
|
|
||||||
|
|
||||||
/* standard file protocol */
|
/* standard file protocol */
|
||||||
@ -44,7 +44,7 @@ static int file_open(URLContext *h, const char *filename, int flags)
|
|||||||
} else {
|
} else {
|
||||||
access = O_RDONLY;
|
access = O_RDONLY;
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__)
|
#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
|
||||||
access |= O_BINARY;
|
access |= O_BINARY;
|
||||||
#endif
|
#endif
|
||||||
fd = open(filename, access, 0666);
|
fd = open(filename, access, 0666);
|
||||||
@ -70,7 +70,7 @@ static int file_write(URLContext *h, unsigned char *buf, int size)
|
|||||||
static offset_t file_seek(URLContext *h, offset_t pos, int whence)
|
static offset_t file_seek(URLContext *h, offset_t pos, int whence)
|
||||||
{
|
{
|
||||||
int fd = (size_t)h->priv_data;
|
int fd = (size_t)h->priv_data;
|
||||||
#if defined(CONFIG_WIN32) && !defined(__CYGWIN__)
|
#if defined(__MINGW32__)
|
||||||
return _lseeki64(fd, pos, whence);
|
return _lseeki64(fd, pos, whence);
|
||||||
#else
|
#else
|
||||||
return lseek(fd, pos, whence);
|
return lseek(fd, pos, whence);
|
||||||
@ -103,7 +103,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
|
|||||||
} else {
|
} else {
|
||||||
fd = 0;
|
fd = 0;
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__)
|
#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
|
||||||
setmode(fd, O_BINARY);
|
setmode(fd, O_BINARY);
|
||||||
#endif
|
#endif
|
||||||
h->priv_data = (void *)(size_t)fd;
|
h->priv_data = (void *)(size_t)fd;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#if defined(CONFIG_WINCE)
|
#if defined(CONFIG_WINCE)
|
||||||
/* Skip includes on WinCE. */
|
/* Skip includes on WinCE. */
|
||||||
#elif defined(CONFIG_WIN32)
|
#elif defined(__MINGW32__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#elif defined(CONFIG_OS2)
|
#elif defined(CONFIG_OS2)
|
||||||
@ -40,7 +40,7 @@ int64_t av_gettime(void)
|
|||||||
{
|
{
|
||||||
#if defined(CONFIG_WINCE)
|
#if defined(CONFIG_WINCE)
|
||||||
return timeGetTime() * int64_t_C(1000);
|
return timeGetTime() * int64_t_C(1000);
|
||||||
#elif defined(CONFIG_WIN32)
|
#elif defined(__MINGW32__)
|
||||||
struct timeb tb;
|
struct timeb tb;
|
||||||
_ftime(&tb);
|
_ftime(&tb);
|
||||||
return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);
|
return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
typedef unsigned short uint16_t;
|
typedef unsigned short uint16_t;
|
||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
|
|
||||||
# ifdef CONFIG_WIN32
|
# ifdef __MINGW32__
|
||||||
typedef signed __int64 int64_t;
|
typedef signed __int64 int64_t;
|
||||||
typedef unsigned __int64 uint64_t;
|
typedef unsigned __int64 uint64_t;
|
||||||
# else /* other OS */
|
# else /* other OS */
|
||||||
@ -178,7 +178,7 @@ typedef uint64_t uint_fast64_t;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef __MINGW32__
|
||||||
|
|
||||||
/* windows */
|
/* windows */
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ typedef uint64_t uint_fast64_t;
|
|||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* CONFIG_WIN32 end */
|
/* __MINGW32__ end */
|
||||||
#elif defined (CONFIG_OS2)
|
#elif defined (CONFIG_OS2)
|
||||||
/* OS/2 EMX */
|
/* OS/2 EMX */
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ typedef uint64_t uint_fast64_t;
|
|||||||
# endif
|
# endif
|
||||||
# endif /* HAVE_AV_CONFIG_H */
|
# endif /* HAVE_AV_CONFIG_H */
|
||||||
|
|
||||||
#endif /* !CONFIG_WIN32 && !CONFIG_OS2 */
|
#endif /* !__MINGW32__ && !CONFIG_OS2 */
|
||||||
|
|
||||||
#ifdef HAVE_AV_CONFIG_H
|
#ifdef HAVE_AV_CONFIG_H
|
||||||
|
|
||||||
@ -588,7 +588,7 @@ tend= read_time();\
|
|||||||
/* btw, rintf() is existing on fbsd too -- alex */
|
/* btw, rintf() is existing on fbsd too -- alex */
|
||||||
static always_inline long int lrintf(float x)
|
static always_inline long int lrintf(float x)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef __MINGW32__
|
||||||
# ifdef ARCH_X86
|
# ifdef ARCH_X86
|
||||||
int32_t i;
|
int32_t i;
|
||||||
asm volatile(
|
asm volatile(
|
||||||
@ -602,7 +602,7 @@ static always_inline long int lrintf(float x)
|
|||||||
# endif /* ARCH_X86 */
|
# endif /* ARCH_X86 */
|
||||||
#else
|
#else
|
||||||
return (int)(rint(x));
|
return (int)(rint(x));
|
||||||
#endif /* CONFIG_WIN32 */
|
#endif /* __MINGW32__ */
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifndef _ISOC9X_SOURCE
|
#ifndef _ISOC9X_SOURCE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user