[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gv] [PATCH] do not define errno, as it might be a macro already.
From: |
Bernhard R. Link |
Subject: |
[bug-gv] [PATCH] do not define errno, as it might be a macro already. |
Date: |
Mon, 1 Aug 2011 21:33:06 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Errno will usually be a macro nowadays (to make use of thread local
storage), so defining it as
extern int errno;
is made by the preprocessor to:
extern int (*__errno_location ());
which luckily currently still works, but shows that is really not
what should be done, so remove the definitions. (Which also silences
a compiler warning).
---
gv/src/Ghostview.c | 2 --
gv/src/error.h | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/gv/src/Ghostview.c b/gv/src/Ghostview.c
index eb8768c..aefefcb 100644
--- a/gv/src/Ghostview.c
+++ b/gv/src/Ghostview.c
@@ -86,8 +86,6 @@ typedef char *XPointer;
#endif
#include <errno.h>
-/* BSD 4.3 errno.h does not declare errno */
-extern int errno;
/* Both error returns are checked for non-blocking I/O. */
/* Manufacture the other error code if only one exists. */
#if !defined(EWOULDBLOCK) && defined(EAGAIN)
diff --git a/gv/src/error.h b/gv/src/error.h
index f065bda..6c2e9b3 100644
--- a/gv/src/error.h
+++ b/gv/src/error.h
@@ -34,8 +34,6 @@
#define _GV_ERROR_H_
#include <errno.h>
-/* BSD 4.3 errno.h does not declare errno */
-extern int errno;
extern char* open_fail_error (int, char *, char *, int);
--
1.7.2.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-gv] [PATCH] do not define errno, as it might be a macro already.,
Bernhard R. Link <=