X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=mingwrt%2Finclude%2Funistd.h;h=5e8309dbbfcbd2a3f6d32c63b8ac5f2acbc3d9ba;hb=75741ed73886a6caa5486e09124d66e78a50fb51;hp=6f0869015f3faf5de82c47b424246275ccc006da;hpb=815e56ccb4829c9095a264e05f7afcb4f88f8484;p=mingw%2Fmingw-org-wsl.git diff --git a/mingwrt/include/unistd.h b/mingwrt/include/unistd.h index 6f08690..5e8309d 100644 --- a/mingwrt/include/unistd.h +++ b/mingwrt/include/unistd.h @@ -12,7 +12,8 @@ * Ramiro Polla * Gregory McGarry * Keith Marshall - * Copyright (C) 1997, 1999, 2002-2004, 2007-2009, 2014, MinGW.org Project. + * Copyright (C) 1997, 1999, 2002-2004, 2007-2009, 2014-2015, + * MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -90,8 +91,8 @@ int __mingw_sleep( unsigned long, unsigned long ); * with period values normally distributed around means of ~27.5 ms * and ~7.5 ms, for the two system types respectively. */ -#define _FAKE_TIME_H_SOURCED 1 -#define __need_struct_timespec 1 +#define _FAKE_TIME_H_SOURCED 1 +#define __need_struct_timespec #include _BEGIN_C_DECLS @@ -109,8 +110,8 @@ __CRT_INLINE __LIBIMPL__(( FUNCTION = nanosleep )) int nanosleep( const struct timespec *period, struct timespec *residual ) { if( residual != (void *)(0) ) - residual->tv_sec = (long long)(residual->tv_nsec = 0); - return __mingw_sleep((unsigned)(period->tv_sec), (period->tv_sec < 0LL) + residual->__tv64_sec = (__time64_t)(residual->tv_nsec = 0); + return __mingw_sleep((unsigned)(period->__tv64_sec), (period->__tv64_sec < 0LL) ? (unsigned)(-1) : (unsigned)(period->tv_nsec)); } #endif