Skip to content

Commit 555eb1a

Browse files
committed
Remove obsolete ifdefs
Commit 8dace66 added #ifdefs for a number of errno symbols because they were not present on Windows. Later, commit 125ad53 added replacement #defines for some of those symbols. So some of the changes from the first commit are made dead code by the second commit and can now be removed. Discussion: https://www.postgresql.org/message-id/flat/6dee8574-b0ad-fc49-9c8c-2edc796f0033@2ndquadrant.com
1 parent 8a58347 commit 555eb1a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/port/strerror.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,10 @@ get_errno_symbol(int errnum)
118118
return "E2BIG";
119119
case EACCES:
120120
return "EACCES";
121-
#ifdef EADDRINUSE
122121
case EADDRINUSE:
123122
return "EADDRINUSE";
124-
#endif
125-
#ifdef EADDRNOTAVAIL
126123
case EADDRNOTAVAIL:
127124
return "EADDRNOTAVAIL";
128-
#endif
129125
case EAFNOSUPPORT:
130126
return "EAFNOSUPPORT";
131127
#ifdef EAGAIN
@@ -176,10 +172,8 @@ get_errno_symbol(int errnum)
176172
return "EINVAL";
177173
case EIO:
178174
return "EIO";
179-
#ifdef EISCONN
180175
case EISCONN:
181176
return "EISCONN";
182-
#endif
183177
case EISDIR:
184178
return "EISDIR";
185179
#ifdef ELOOP
@@ -216,20 +210,16 @@ get_errno_symbol(int errnum)
216210
return "ENOSPC";
217211
case ENOSYS:
218212
return "ENOSYS";
219-
#ifdef ENOTCONN
220213
case ENOTCONN:
221214
return "ENOTCONN";
222-
#endif
223215
case ENOTDIR:
224216
return "ENOTDIR";
225217
#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
226218
case ENOTEMPTY:
227219
return "ENOTEMPTY";
228220
#endif
229-
#ifdef ENOTSOCK
230221
case ENOTSOCK:
231222
return "ENOTSOCK";
232-
#endif
233223
#ifdef ENOTSUP
234224
case ENOTSUP:
235225
return "ENOTSUP";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy