X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fmph.h;h=daa5828d6db646818d49d1a834cbab2a4bae787d;hb=831403d104705c81d2fdb98473855da2e3076311;hp=7c7705e958b991b0b6e4914531aa09e443f7a9d6;hpb=7015b812166d0992223b5dc4421deab637500265;p=mono.git diff --git a/support/mph.h b/support/mph.h index 7c7705e958b..daa5828d6db 100644 --- a/support/mph.h +++ b/support/mph.h @@ -69,6 +69,16 @@ #define L_XTND SEEK_END #endif /* ndef L_XTND */ +/* + * XATTR_AUTO is a synonym for 0 within XattrFlags, but most systems don't + * define it. map.c doesn't know that, though, so we ensure that it's defined + * so that the value 0 round-trips through MonoPosixHelper. + */ + +#ifndef XATTR_AUTO +#define XATTR_AUTO 0 +#endif /* ndef XATTR_AUTO */ + #endif /* ndef PLATFORM_WIN32 */ typedef gint64 mph_blkcnt_t; @@ -160,6 +170,13 @@ typedef gint64 suseconds_t; #define mph_return_if_time_t_overflow(var) mph_return_if_long_overflow(var) +#define mph_return_if_val_in_list5(var,a,b,c,d,e) \ + do { \ + int v = (var); \ + if (v == a || v == b || v == c || v == d || v == e) \ + return -1; \ + } while (0) + /* * Helper function for functions which use ERANGE (such as getpwnam_r and * getgrnam_r). These functions accept buffers which are dynamically