diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libc/net/gai_strerror.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/lib/libc/net/gai_strerror.c b/src/lib/libc/net/gai_strerror.c index 37e0b55e8b..c701c8f422 100644 --- a/src/lib/libc/net/gai_strerror.c +++ b/src/lib/libc/net/gai_strerror.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * %%% copyright-cmetz-97-bsd | 2 | * %%% copyright-cmetz-97-bsd |
| 3 | * Copyright (c) 1997-1999, Craig Metz, All rights reserved. | 3 | * Copyright (c) 1997-1999, Craig Metz, All rights reserved. |
| 4 | * | 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: | 7 | * are met: |
| @@ -17,7 +17,7 @@ | |||
| 17 | * 4. Neither the name of the author nor the names of contributors | 17 | * 4. Neither the name of the author nor the names of contributors |
| 18 | * may be used to endorse or promote products derived from this software | 18 | * may be used to endorse or promote products derived from this software |
| 19 | * without specific prior written permission. | 19 | * without specific prior written permission. |
| 20 | * | 20 | * |
| 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| @@ -29,7 +29,6 @@ | |||
| 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 31 | * SUCH DAMAGE. | 31 | * SUCH DAMAGE. |
| 32 | * | ||
| 33 | */ | 32 | */ |
| 34 | 33 | ||
| 35 | /* gai_strerror() v1.38 */ | 34 | /* gai_strerror() v1.38 */ |
| @@ -38,34 +37,35 @@ | |||
| 38 | #include <netdb.h> | 37 | #include <netdb.h> |
| 39 | #include <errno.h> | 38 | #include <errno.h> |
| 40 | 39 | ||
| 41 | char *gai_strerror(int errnum) | 40 | char * |
| 41 | gai_strerror(int errnum) | ||
| 42 | { | 42 | { |
| 43 | switch(errnum) { | 43 | switch (errnum) { |
| 44 | case 0: | 44 | case 0: |
| 45 | return "no error"; | 45 | return "no error"; |
| 46 | case EAI_BADFLAGS: | 46 | case EAI_BADFLAGS: |
| 47 | return "invalid value for ai_flags"; | 47 | return "invalid value for ai_flags"; |
| 48 | case EAI_NONAME: | 48 | case EAI_NONAME: |
| 49 | return "name or service is not known"; | 49 | return "name or service is not known"; |
| 50 | case EAI_AGAIN: | 50 | case EAI_AGAIN: |
| 51 | return "temporary failure in name resolution"; | 51 | return "temporary failure in name resolution"; |
| 52 | case EAI_FAIL: | 52 | case EAI_FAIL: |
| 53 | return "non-recoverable failure in name resolution"; | 53 | return "non-recoverable failure in name resolution"; |
| 54 | case EAI_NODATA: | 54 | case EAI_NODATA: |
| 55 | return "no address associated with name"; | 55 | return "no address associated with name"; |
| 56 | case EAI_FAMILY: | 56 | case EAI_FAMILY: |
| 57 | return "ai_family not supported"; | 57 | return "ai_family not supported"; |
| 58 | case EAI_SOCKTYPE: | 58 | case EAI_SOCKTYPE: |
| 59 | return "ai_socktype not supported"; | 59 | return "ai_socktype not supported"; |
| 60 | case EAI_SERVICE: | 60 | case EAI_SERVICE: |
| 61 | return "service not supported for ai_socktype"; | 61 | return "service not supported for ai_socktype"; |
| 62 | case EAI_ADDRFAMILY: | 62 | case EAI_ADDRFAMILY: |
| 63 | return "address family for name not supported"; | 63 | return "address family for name not supported"; |
| 64 | case EAI_MEMORY: | 64 | case EAI_MEMORY: |
| 65 | return "memory allocation failure"; | 65 | return "memory allocation failure"; |
| 66 | case EAI_SYSTEM: | 66 | case EAI_SYSTEM: |
| 67 | return "system error"; | 67 | return "system error"; |
| 68 | default: | 68 | default: |
| 69 | return "unknown/invalid error"; | 69 | return "unknown/invalid error"; |
| 70 | }; | 70 | } |
| 71 | }; | 71 | } |
