]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Redefine various error functions for win32
authorDanny Mayer <mayer@ntp.org>
Wed, 3 Nov 2004 04:07:27 +0000 (23:07 -0500)
committerDanny Mayer <mayer@ntp.org>
Wed, 3 Nov 2004 04:07:27 +0000 (23:07 -0500)
bk: 4188597f027NZaErcWhQH0OnWiIm1w

ports/winnt/libisc/isc_strerror.c

index 70a92732c3d8286f4a29728be5f8959761c3ac39..f9ae72e8c71748aa1327d86573ac38e6b7eafefd 100644 (file)
@@ -31,13 +31,13 @@ FormatError(int error);
 char *
 GetWSAErrorMessage(int errval);
 
-char *
-NTstrerror(int err, BOOL *bfreebuf);
+static char *
+isc__NTstrerror(int err, BOOL *bfreebuf);
 
 char *
-strerror(int errnum) {
+NTstrerror(int errnum) {
        BOOL bfreebuf;
-       return (NTstrerror(errnum, &bfreebuf));
+       return (isc__NTstrerror(errnum, &bfreebuf));
 }
 /*
  * This routine needs to free up any buffer allocated by FormatMessage
@@ -51,7 +51,7 @@ isc__strerror(int num, char *buf, size_t size) {
        unsigned int unum = num;
 
        freebuf = FALSE;
-       msg = NTstrerror(num, &freebuf);
+       msg = isc__NTstrerror(num, &freebuf);
        if (msg != NULL)
                _snprintf(buf, size, "%s", msg);
        else
@@ -90,8 +90,8 @@ FormatError(int error) {
  * Error message function GetWSAErrorMessage below if it's within that range
  * since those messages are not available in the system error messages.
  */
-char *
-NTstrerror(int err, BOOL *bfreebuf) {
+static char *
+isc__NTstrerror(int err, BOOL *bfreebuf) {
        char *retmsg = NULL;
 
        /* Copy the error value first in case of other errors */        
@@ -127,7 +127,7 @@ NTperror(char *errmsg) {
        BOOL bfreebuf = FALSE;
        char *msg;
 
-       msg = NTstrerror(errval, &bfreebuf);
+       msg = isc__NTstrerror(errval, &bfreebuf);
        fprintf(stderr, "%s: %s\n", errmsg, msg);
        if(bfreebuf == TRUE) {
                LocalFree(msg);