Patch from MJW for ssize_t

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee 2004-11-12 03:06:44 +00:00
parent 369b9aad15
commit d51253e844
6 changed files with 378 additions and 560 deletions

906
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -3477,6 +3477,9 @@ AC_TYPE_SIZE_T
dnl defines uid_t and gid_t if not already defined
AC_TYPE_UID_T
dnl sets HAVE_SSIZE_T if ssize_t is defined
AC_CHECK_TYPES(ssize_t)
dnl check what exactly size_t is on this machine - this is necessary to avoid
dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h
AC_LANG_SAVE

View File

@ -886,6 +886,19 @@ inline void *wxUIntToPtr(wxUIntPtr p)
#endif
/* Make sure ssize_t is defined (a signed type the same size as size_t) */
/* HAVE_SSIZE_T should be defined for compiliers that already have it */
#ifndef HAVE_SSIZE_T
#if SIZEOF_SIZE_T == 4
typedef wxInt32 ssize_t;
#elif SIZEOF_SIZE_T == 8
typedef wxInt64 ssize_t
#else
#error "error defining ssize_t, size_t is not 4 or 8 bytes"
#endif
#endif
/* base floating point types */
/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits */
/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits */

View File

@ -39,6 +39,9 @@
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* Define if ssize_t type is available. */
#undef HAVE_SSIZE_T
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS

View File

@ -53,6 +53,9 @@
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* Define if ssize_t type is available. */
#undef HAVE_SSIZE_T
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS

View File

@ -144,14 +144,6 @@
#include "wx/msw/private.h"
#endif
#if !defined __UNIX__ && !defined __DJGPP__
#ifdef __WXWINCE__
typedef int ssize_t;
#else
typedef ptrdiff_t ssize_t;
#endif
#endif
wxCOMPILE_TIME_ASSERT(sizeof(ssize_t) == sizeof(size_t), ssize_t_wrong_size);
// ============================================================================
// implementation of wxFile