1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
From: James Troup <james@nocrew.org>
Subject: Remove 'extern int errno' which breaks with new glibc
(>= 2.3.2-ds1-8) and add #include <errno.h> where needed.
--- a/config.c
+++ b/config.c
@@ -26,8 +26,6 @@
/* SUPPRESS 530 */
/* SUPPRESS 560 */
-extern int errno;
-
struct filter *Filters = (struct filter *)NULL;
static unsigned int NumPaths= 0;
--- a/imagetypes.c
+++ b/imagetypes.c
@@ -16,7 +16,6 @@
/* SUPPRESS 560 */
-extern int errno;
extern int findImage(char *name, char *fullname);
/* load a named image
--- a/img.c
+++ b/img.c
@@ -14,10 +14,9 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <errno.h>
#include "image.h"
-extern int errno;
-
#define TRUE 1
#define FALSE 0
--- a/packtar.c
+++ b/packtar.c
@@ -11,8 +11,6 @@
#include <stdio.h>
#include <errno.h>
-extern int errno;
-
/* poor-man's varargs. good enough for now.
*/
int run(a0, a1, a2, a3, a4, a5, a6, a7, a8)
--- a/window.c
+++ b/window.c
@@ -33,8 +33,6 @@
/* SUPPRESS 560 */
-extern int errno; /* not defined in errno.h on some systems */
-
static Window ImageWindow= 0;
static Window ViewportWin= 0;
static Colormap ImageColormap;
|