@@ -481,7 +481,7 @@ else version (CRuntime_UClibc)
alias fexcept_t = ushort;
}
- else version (MIPS32)
+ else version (MIPS_Any)
{
struct fenv_t
{
@@ -113,7 +113,7 @@ else version (CRuntime_UClibc)
///
enum int FP_ILOGBNAN = int.min;
}
- else version (MIPS32)
+ else version (MIPS_Any)
{
///
enum int FP_ILOGB0 = -int.max;
@@ -316,7 +316,7 @@ else version (CRuntime_UClibc)
enum RTLD_LOCAL = 0;
enum RTLD_NODELETE = 0x01000;
}
- else version (MIPS32)
+ else version (MIPS_Any)
{
enum RTLD_LAZY = 0x0001;
enum RTLD_NOW = 0x0002;
@@ -366,6 +366,22 @@ else version (CRuntime_UClibc)
double[6] __fpregs;
}
}
+ else version (MIPS64)
+ {
+ struct __jmp_buf
+ {
+ long __pc;
+ long __sp;
+ long[8] __regs;
+ long __fp;
+ long __gp;
+ int __fpc_csr;
+ version (MIPS_N64)
+ double[8] __fpregs;
+ else
+ double[6] __fpregs;
+ }
+ }
else
static assert(0, "unimplemented");
@@ -1277,6 +1277,18 @@ else version (CRuntime_UClibc)
enum __SIZEOF_PTHREAD_BARRIER_T = 20;
enum __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
}
+ else version (MIPS64)
+ {
+ enum __SIZEOF_PTHREAD_ATTR_T = 56;
+ enum __SIZEOF_PTHREAD_MUTEX_T = 40;
+ enum __SIZEOF_PTHREAD_MUTEXATTR_T = 4;
+ enum __SIZEOF_PTHREAD_COND_T = 48;
+ enum __SIZEOF_PTHREAD_CONDATTR_T = 4;
+ enum __SIZEOF_PTHREAD_RWLOCK_T = 56;
+ enum __SIZEOF_PTHREAD_RWLOCKATTR_T = 8;
+ enum __SIZEOF_PTHREAD_BARRIER_T = 32;
+ enum __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
+ }
else version (ARM)
{
enum __SIZEOF_PTHREAD_ATTR_T = 36;
@@ -3850,7 +3850,7 @@ string expandTilde(string inputPath) nothrow
version (Posix)
{
import core.exception : onOutOfMemoryError;
- import core.stdc.errno : errno, ERANGE;
+ import core.stdc.errno : errno, EBADF, ENOENT, EPERM, ERANGE, ESRCH;
import core.stdc.stdlib : malloc, free, realloc;
/* Joins a path from a C string to the remainder of path.
@@ -3950,7 +3950,7 @@ string expandTilde(string inputPath) nothrow
scope(exit) free(extra_memory);
passwd result;
- while (1)
+ loop: while (1)
{
extra_memory = cast(char*) realloc(extra_memory, extra_memory_size * char.sizeof);
if (extra_memory == null)
@@ -3969,10 +3969,23 @@ string expandTilde(string inputPath) nothrow
break;
}
- if (errno != ERANGE &&
+ switch (errno)
+ {
+ case ERANGE:
// On BSD and OSX, errno can be left at 0 instead of set to ERANGE
- errno != 0)
- onOutOfMemoryError();
+ case 0:
+ break;
+
+ case ENOENT:
+ case ESRCH:
+ case EBADF:
+ case EPERM:
+ // The given name or uid was not found.
+ break loop;
+
+ default:
+ onOutOfMemoryError();
+ }
// extra_memory isn't large enough
import core.checkedint : mulu;
@@ -52,8 +52,7 @@ else version (CRuntime_Musl)
}
else version (CRuntime_UClibc)
{
- // uClibc supports GCC IO
- version = GCC_IO;
+ version = GENERIC_IO;
}
else version (OSX)
{