Commit 8dace66e authored by Tom Lane's avatar Tom Lane

Add #ifdef guards for some POSIX error symbols that Windows doesn't like.

Per buildfarm results.  It looks like the older the Windows version, the
more errno codes it hasn't got ...
parent 8e68816c
...@@ -3254,28 +3254,38 @@ get_errno_symbol(int errnum) ...@@ -3254,28 +3254,38 @@ get_errno_symbol(int errnum)
return "E2BIG"; return "E2BIG";
case EACCES: case EACCES:
return "EACCES"; return "EACCES";
#ifdef EADDRINUSE
case EADDRINUSE: case EADDRINUSE:
return "EADDRINUSE"; return "EADDRINUSE";
#endif
#ifdef EADDRNOTAVAIL
case EADDRNOTAVAIL: case EADDRNOTAVAIL:
return "EADDRNOTAVAIL"; return "EADDRNOTAVAIL";
#endif
case EAFNOSUPPORT: case EAFNOSUPPORT:
return "EAFNOSUPPORT"; return "EAFNOSUPPORT";
#ifdef EAGAIN #ifdef EAGAIN
case EAGAIN: case EAGAIN:
return "EAGAIN"; return "EAGAIN";
#endif #endif
#ifdef EALREADY
case EALREADY: case EALREADY:
return "EALREADY"; return "EALREADY";
#endif
case EBADF: case EBADF:
return "EBADF"; return "EBADF";
#ifdef EBADMSG
case EBADMSG: case EBADMSG:
return "EBADMSG"; return "EBADMSG";
#endif
case EBUSY: case EBUSY:
return "EBUSY"; return "EBUSY";
case ECHILD: case ECHILD:
return "ECHILD"; return "ECHILD";
#ifdef ECONNABORTED
case ECONNABORTED: case ECONNABORTED:
return "ECONNABORTED"; return "ECONNABORTED";
#endif
case ECONNREFUSED: case ECONNREFUSED:
return "ECONNREFUSED"; return "ECONNREFUSED";
#ifdef ECONNRESET #ifdef ECONNRESET
...@@ -3292,8 +3302,10 @@ get_errno_symbol(int errnum) ...@@ -3292,8 +3302,10 @@ get_errno_symbol(int errnum)
return "EFAULT"; return "EFAULT";
case EFBIG: case EFBIG:
return "EFBIG"; return "EFBIG";
#ifdef EHOSTUNREACH
case EHOSTUNREACH: case EHOSTUNREACH:
return "EHOSTUNREACH"; return "EHOSTUNREACH";
#endif
case EIDRM: case EIDRM:
return "EIDRM"; return "EIDRM";
case EINPROGRESS: case EINPROGRESS:
...@@ -3304,12 +3316,16 @@ get_errno_symbol(int errnum) ...@@ -3304,12 +3316,16 @@ get_errno_symbol(int errnum)
return "EINVAL"; return "EINVAL";
case EIO: case EIO:
return "EIO"; return "EIO";
#ifdef EISCONN
case EISCONN: case EISCONN:
return "EISCONN"; return "EISCONN";
#endif
case EISDIR: case EISDIR:
return "EISDIR"; return "EISDIR";
#ifdef ELOOP
case ELOOP: case ELOOP:
return "ELOOP"; return "ELOOP";
#endif
case EMFILE: case EMFILE:
return "EMFILE"; return "EMFILE";
case EMLINK: case EMLINK:
...@@ -3334,16 +3350,20 @@ get_errno_symbol(int errnum) ...@@ -3334,16 +3350,20 @@ get_errno_symbol(int errnum)
return "ENOSPC"; return "ENOSPC";
case ENOSYS: case ENOSYS:
return "ENOSYS"; return "ENOSYS";
#ifdef ENOTCONN
case ENOTCONN: case ENOTCONN:
return "ENOTCONN"; return "ENOTCONN";
#endif
case ENOTDIR: case ENOTDIR:
return "ENOTDIR"; return "ENOTDIR";
#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */ #if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY: case ENOTEMPTY:
return "ENOTEMPTY"; return "ENOTEMPTY";
#endif #endif
#ifdef ENOTSOCK
case ENOTSOCK: case ENOTSOCK:
return "ENOTSOCK"; return "ENOTSOCK";
#endif
#ifdef ENOTSUP #ifdef ENOTSUP
case ENOTSUP: case ENOTSUP:
return "ENOTSUP"; return "ENOTSUP";
...@@ -3356,8 +3376,10 @@ get_errno_symbol(int errnum) ...@@ -3356,8 +3376,10 @@ get_errno_symbol(int errnum)
case EOPNOTSUPP: case EOPNOTSUPP:
return "EOPNOTSUPP"; return "EOPNOTSUPP";
#endif #endif
#ifdef EOVERFLOW
case EOVERFLOW: case EOVERFLOW:
return "EOVERFLOW"; return "EOVERFLOW";
#endif
case EPERM: case EPERM:
return "EPERM"; return "EPERM";
case EPIPE: case EPIPE:
...@@ -3372,10 +3394,14 @@ get_errno_symbol(int errnum) ...@@ -3372,10 +3394,14 @@ get_errno_symbol(int errnum)
#endif #endif
case ESRCH: case ESRCH:
return "ESRCH"; return "ESRCH";
#ifdef ETIMEDOUT
case ETIMEDOUT: case ETIMEDOUT:
return "ETIMEDOUT"; return "ETIMEDOUT";
#endif
#ifdef ETXTBSY
case ETXTBSY: case ETXTBSY:
return "ETXTBSY"; return "ETXTBSY";
#endif
#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
case EWOULDBLOCK: case EWOULDBLOCK:
return "EWOULDBLOCK"; return "EWOULDBLOCK";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment