]> git.sur5r.net Git - openldap/commitdiff
Define strerror() if it doesn't exist.
authorHoward Chu <hyc@openldap.org>
Sun, 29 Aug 1999 01:56:00 +0000 (01:56 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 29 Aug 1999 01:56:00 +0000 (01:56 +0000)
include/ac/errno.h

index 24cb5d0b3849cbd951f68662b28be2a78b270258..a7b10eb5d8a2aa6fc8fd785e44b48d36093c6e3b 100644 (file)
        extern char     *sys_errlist[];
 #endif
 
+#ifndef HAVE_STRERROR
+#define        strerror(err) \
+       (err) > -1 && (err) < sys_nerr ? sys_errlist[(err)] : "unknown"
+#endif
+
 extern char* strerror_r();
     
 #endif /* _AC_ERRNO_H */