1 #if !defined(lint) && !defined(DOS)
2 static char rcsid
[] = "$Id: err_desc.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
6 * ========================================================================
7 * Copyright 2013-2018 Eduardo Chappa
8 * Copyright 2006 University of Washington
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * ========================================================================
23 /*----------------------------------------------------------------------
24 Return string describing the error
26 Args: errnumber -- The system error number (errno)
28 Result: long string describing the error is returned
31 error_description(int errnumber
)
33 static char buffer
[50+1];
38 snprintf(buffer
, sizeof(buffer
), "%s", strerror(errnumber
));
40 snprintf(buffer
, sizeof(buffer
), "Unknown error #%d", errnumber
);
42 return ( (char *) buffer
);