]> www.ginac.de Git - cln.git/commitdiff
[compile fix] Remove incorrect forward-declaration of perror().
authorAlexey Sheplyakov <asheplyakov@yandex.ru>
Sun, 26 Feb 2012 19:55:08 +0000 (21:55 +0200)
committerAlexey Sheplyakov <asheplyakov@altlinux.org>
Sun, 20 Dec 2020 13:45:58 +0000 (17:45 +0400)
First of all, the return type is void, not int (according to C89).
Secondly, perror is required by C89, so there's no need to check for it.

Fixes (cross-) compilation with MinGW.

src/timing/cl_t_current.cc
src/timing/cl_t_current2.cc

index fd0e197bb040f39e0c2e6c09bc0433d9532ce222..2d6176088e2c1a39f5d8209ea1db5a9247de3365 100644 (file)
 #else
   #include <ctime>
 #endif
-#ifdef HAVE_PERROR_DECL
-  #include <cerrno>
-  #include <cstdio>
-#else
-  extern "C" int perror (const char *);
-#endif
+#include <cerrno>
+#include <cstdio>
 
 namespace cln {
 
index 085a24e9eb168c2110c81316cf257c79a88f63f7..e65f6c3bfd30bd09b446a1456ad13042892473a9 100644 (file)
   #include <sys/times.h>
   extern "C" clock_t times (struct tms * buffer);
 #endif
-#ifdef HAVE_PERROR_DECL
-  #include <cerrno>
-  #include <cstdio>
-#else
-  extern "C" int perror (const char *);
-#endif
+#include <cerrno>
+#include <cstdio>
 
 namespace cln {