X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fmph.h;h=7c7705e958b991b0b6e4914531aa09e443f7a9d6;hb=32f7f10934164005031a25ad0f244a50936623f6;hp=74dab37cb1b809f19f50c5ed7db3a78694a22660;hpb=0443306d611d0830e27327e1f0a3ef3457dfa535;p=mono.git diff --git a/support/mph.h b/support/mph.h index 74dab37cb1b..7c7705e958b 100644 --- a/support/mph.h +++ b/support/mph.h @@ -35,8 +35,6 @@ #include /* for SIZE_MAX */ #endif -#include "map-icalls.h" - #if __APPLE__ || __BSD__ || __FreeBSD__ #define MPH_ON_BSD #endif @@ -51,6 +49,28 @@ #define EOVERFLOW 75 #endif /* def PLATFORM_WIN32 && ndef EOVERFLOW */ +#if !defined (PLATFORM_WIN32) + +/* + * Solaris doesn't define these BSD values, and if they're not present then + * map.c:Mono_Posix_FromSeekFlags() breaks badly; see: + * http://bugzilla.gnome.org/show_bug.cgi?id=370081 + */ + +#ifndef L_SET +#define L_SET SEEK_SET +#endif /* ndef L_SET */ + +#ifndef L_INCR +#define L_INCR SEEK_CUR +#endif /* ndef L_INCR */ + +#ifndef L_XTND +#define L_XTND SEEK_END +#endif /* ndef L_XTND */ + +#endif /* ndef PLATFORM_WIN32 */ + typedef gint64 mph_blkcnt_t; typedef gint64 mph_blksize_t; typedef guint64 mph_dev_t; @@ -67,6 +87,19 @@ typedef gint64 mph_clock_t; typedef guint64 mph_fsblkcnt_t; typedef guint64 mph_fsfilcnt_t; +/* Some versions of OS X don't define these typedefs, needed by map.c */ +#ifndef HAVE_BLKCNT_T +typedef mph_blkcnt_t blkcnt_t; +#endif + +#ifndef HAVE_BLKSIZE_T +typedef mph_blksize_t blksize_t; +#endif + +#ifndef HAVE_SUSECONDS_T +typedef gint64 suseconds_t; +#endif + #ifdef HAVE_LARGE_FILE_SUPPORT #define MPH_OFF_T_MAX G_MAXINT64 #define MPH_OFF_T_MIN G_MININT64