diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2004-03-14 09:38:03 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2004-03-14 09:38:03 +0000 |
commit | 513b66997b1a0c4e804c13b6840ccd7a7de41ad9 (patch) | |
tree | 6e17ae5e4d93c4e229885cfd0173d99ff96956c6 | |
parent | 3153a3a8519aacb14bc8af15c63176f10b54a4ec (diff) | |
download | xine-lib-513b66997b1a0c4e804c13b6840ccd7a7de41ad9.tar.gz xine-lib-513b66997b1a0c4e804c13b6840ccd7a7de41ad9.tar.bz2 |
Update WIN32 port:
- add stdint.h with INT16_MIN/MAX
- apply forgotten change _MSC_VER -> HAVE_ICONV
- get rid of some _MSC_VER - changed to WIN32 since it'll be used by MINGW too
CVS patchset: 6249
CVS date: 2004/03/14 09:38:03
-rw-r--r-- | src/xine-engine/audio_decoder.c | 3 | ||||
-rw-r--r-- | src/xine-engine/audio_out.c | 3 | ||||
-rw-r--r-- | src/xine-engine/broadcaster.c | 6 | ||||
-rw-r--r-- | src/xine-engine/io_helper.c | 2 | ||||
-rw-r--r-- | src/xine-engine/osd.h | 8 | ||||
-rw-r--r-- | win32/include/stdint.h | 155 |
6 files changed, 167 insertions, 10 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 3e6401b17..6232c7f5c 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.123 2004/03/12 14:53:16 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.124 2004/03/14 09:38:03 valtri Exp $ * * * functions that implement audio decoding @@ -30,6 +30,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdint.h> #include <sched.h> #include <unistd.h> diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 4e66b4ad8..90d116416 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.165 2004/03/08 18:33:54 jcdutton Exp $ + * $Id: audio_out.c,v 1.166 2004/03/14 09:38:03 valtri Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -71,6 +71,7 @@ #include <errno.h> #include <string.h> #include <stdlib.h> +#include <stdint.h> #include <fcntl.h> #include <math.h> #include <unistd.h> diff --git a/src/xine-engine/broadcaster.c b/src/xine-engine/broadcaster.c index 95fa1cb9e..4b203ffb3 100644 --- a/src/xine-engine/broadcaster.c +++ b/src/xine-engine/broadcaster.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: broadcaster.c,v 1.6 2004/03/03 20:09:16 mroi Exp $ + * $Id: broadcaster.c,v 1.7 2004/03/14 09:38:03 valtri Exp $ * * broadcaster.c - xine network broadcaster * @@ -51,11 +51,11 @@ #include <sys/socket.h> #include <netinet/in.h> -#ifndef _MSC_VER +#ifndef WIN32 #include <sys/ioctl.h> #include <arpa/inet.h> #include <netdb.h> -#endif /* _MSC_VER */ +#endif #include <dlfcn.h> #include <pthread.h> diff --git a/src/xine-engine/io_helper.c b/src/xine-engine/io_helper.c index f631a0736..9f14559b5 100644 --- a/src/xine-engine/io_helper.c +++ b/src/xine-engine/io_helper.c @@ -66,7 +66,7 @@ static int _x_io_tcp_connect_ipv4(xine_stream_t *stream, const char *host, int p return -1; } -#ifndef _MSC_VER +#ifndef WIN32 if (fcntl (s, F_SETFL, fcntl (s, F_GETFL) | O_NONBLOCK) == -1) { _x_message(stream, XINE_MSG_CONNECTION_REFUSED, "can't put socket in non-blocking mode", strerror(errno), NULL); return -1; diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h index fc1a31bca..b50b1f1f4 100644 --- a/src/xine-engine/osd.h +++ b/src/xine-engine/osd.h @@ -18,15 +18,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * OSD stuff (text and graphic primitives) - * $Id: osd.h,v 1.24 2004/02/12 18:19:12 mroi Exp $ + * $Id: osd.h,v 1.25 2004/03/14 09:38:03 valtri Exp $ */ #ifndef HAVE_OSD_H #define HAVE_OSD_H -#ifndef _MSC_VER +#ifdef HAVE_ICONV # include <iconv.h> -#endif /* _MSC_VER */ +#endif #ifdef XINE_COMPILE # include "video_overlay.h" @@ -59,7 +59,7 @@ struct osd_object_s { int32_t handle; -#ifndef _MSC_VER +#ifdef HAVE_ICONV iconv_t cd; /* iconv handle of encoding */ char *encoding; /* name of encoding */ #endif diff --git a/win32/include/stdint.h b/win32/include/stdint.h new file mode 100644 index 000000000..6ddaf3fd6 --- /dev/null +++ b/win32/include/stdint.h @@ -0,0 +1,155 @@ +/* stdint.h - integer types + + Copyright 2003 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +/* + * Copyright (C) 2000-2004 the xine project + * + * This file is part of xine, a free video player. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with self program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * $Id: stdint.h,v 1.1 2004/03/14 09:38:03 valtri Exp $ + */ + +/* Modified original CygWin version for using by MSVC port. */ + +#ifndef _STDINT_H +#define _STDINT_H + +/* Exact-width integer types */ + +#include <inttypes.h> + +/* Limits of exact-width integer types */ + +#define INT8_MIN (-128) +#define INT16_MIN (-32768) +#define INT32_MIN (-2147483647 - 1) +#define INT64_MIN (-9223372036854775807LL - 1LL) + +#define INT8_MAX (127) +#define INT16_MAX (32767) +#define INT32_MAX (2147483647) +#define INT64_MAX (9223372036854775807LL) + +#define UINT8_MAX (255) +#define UINT16_MAX (65535) +#define UINT32_MAX (4294967295UL) +#define UINT64_MAX (18446744073709551615ULL) + +/* Limits of minimum-width integer types */ + +#define INT_LEAST8_MIN (-128) +#define INT_LEAST16_MIN (-32768) +#define INT_LEAST32_MIN (-2147483647 - 1) +#define INT_LEAST64_MIN (-9223372036854775807LL - 1LL) + +#define INT_LEAST8_MAX (127) +#define INT_LEAST16_MAX (32767) +#define INT_LEAST32_MAX (2147483647) +#define INT_LEAST64_MAX (9223372036854775807LL) + +#define UINT_LEAST8_MAX (255) +#define UINT_LEAST16_MAX (65535) +#define UINT_LEAST32_MAX (4294967295UL) +#define UINT_LEAST64_MAX (18446744073709551615ULL) + +/* Limits of fastest minimum-width integer types */ + +#define INT_FAST8_MIN (-128) +#define INT_FAST16_MIN (-2147483647 - 1) +#define INT_FAST32_MIN (-2147483647 - 1) +#define INT_FAST64_MIN (-9223372036854775807LL - 1LL) + +#define INT_FAST8_MAX (127) +#define INT_FAST16_MAX (2147483647) +#define INT_FAST32_MAX (2147483647) +#define INT_FAST64_MAX (9223372036854775807LL) + +#define UINT_FAST8_MAX (255) +#define UINT_FAST16_MAX (4294967295UL) +#define UINT_FAST32_MAX (4294967295UL) +#define UINT_FAST64_MAX (18446744073709551615ULL) + +/* Limits of integer types capable of holding object pointers */ + +#define INTPTR_MIN (-2147483647 - 1) +#define INTPTR_MAX (2147483647) +#define UINTPTR_MAX (4294967295UL) + +/* Limits of greatest-width integer types */ + +#define INTMAX_MIN (-9223372036854775807LL - 1LL) +#define INTMAX_MAX (9223372036854775807LL) +#define UINTMAX_MAX (18446744073709551615ULL) + +/* Limits of other integer types */ + +#ifndef PTRDIFF_MIN +#define PTRDIFF_MIN (-2147483647 - 1) +#define PTRDIFF_MAX (2147483647) +#endif + +#ifndef SIG_ATOMIC_MIN +#define SIG_ATOMIC_MIN (-2147483647 - 1) +#endif +#ifndef SIG_ATOMIC_MAX +#define SIG_ATOMIC_MAX (2147483647) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (4294967295UL) +#endif + +#ifndef WCHAR_MIN +#ifdef __WCHAR_MIN__ +#define WCHAR_MIN __WCHAR_MIN__ +#define WCHAR_MAX __WCHAR_MAX__ +#else +#define WCHAR_MIN (0) +#define WCHAR_MAX (65535) +#endif +#endif + +#ifndef WINT_MIN +#define WINT_MIN (-2147483647 - 1) +#define WINT_MAX (2147483647) +#endif + +/* Macros for minimum-width integer constant expressions */ + +#define INT8_C(x) x +#define INT16_C(x) x +#define INT32_C(x) x ## L +#define INT64_C(x) x ## LL + +#define UINT8_C(x) x ## U +#define UINT16_C(x) x ## U +#define UINT32_C(x) x ## UL +#define UINT64_C(x) x ## ULL + +/* Macros for greatest-width integer constant expressions */ + +#define INTMAX_C(x) x ## L +#define UINTMAX_C(x) x ## UL + +#endif /* _STDINT_H */ |