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:
parent
369b9aad15
commit
d51253e844
@ -3477,6 +3477,9 @@ AC_TYPE_SIZE_T
|
|||||||
dnl defines uid_t and gid_t if not already defined
|
dnl defines uid_t and gid_t if not already defined
|
||||||
AC_TYPE_UID_T
|
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 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
|
dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h
|
||||||
AC_LANG_SAVE
|
AC_LANG_SAVE
|
||||||
|
@ -886,6 +886,19 @@ inline void *wxUIntToPtr(wxUIntPtr p)
|
|||||||
#endif
|
#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 */
|
/* base floating point types */
|
||||||
/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits */
|
/* 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 */
|
/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits */
|
||||||
|
@ -39,6 +39,9 @@
|
|||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
||||||
|
/* Define if ssize_t type is available. */
|
||||||
|
#undef HAVE_SSIZE_T
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
||||||
|
/* Define if ssize_t type is available. */
|
||||||
|
#undef HAVE_SSIZE_T
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define if you have the ANSI C header files. */
|
||||||
#define STDC_HEADERS
|
#define STDC_HEADERS
|
||||||
|
|
||||||
|
@ -144,14 +144,6 @@
|
|||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
#endif
|
#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
|
// implementation of wxFile
|
||||||
|
Loading…
Reference in New Issue
Block a user