2002-09-07 03:09:13 -04:00
|
|
|
$OpenBSD: patch-rw_libpnmrw_c,v 1.3 2002/09/07 07:09:13 pvalchev Exp $
|
|
|
|
--- rw/libpnmrw.c.orig Fri Sep 6 23:24:14 2002
|
|
|
|
+++ rw/libpnmrw.c Fri Sep 6 23:38:07 2002
|
2001-06-12 23:53:39 -04:00
|
|
|
@@ -46,7 +46,7 @@
|
|
|
|
|
|
|
|
void *malloc(int);
|
|
|
|
void free(void *);
|
|
|
|
-#if defined(__EMX__) || defined(__CYGWIN__)
|
2002-09-07 03:09:13 -04:00
|
|
|
+#if defined(__EMX__) || defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
2001-06-12 23:53:39 -04:00
|
|
|
#include <errno.h>
|
|
|
|
#endif
|
|
|
|
|
2002-02-20 17:56:13 -05:00
|
|
|
@@ -131,6 +131,7 @@ pm_freearray(char **its, int rows)
|
2001-06-12 23:53:39 -04:00
|
|
|
static void
|
|
|
|
pm_perror(char *reason)
|
|
|
|
{
|
|
|
|
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
|
|
|
|
#if defined(BSD4_4)
|
|
|
|
__const extern char *__const sys_errlist[];
|
|
|
|
#else
|
2002-02-20 17:56:13 -05:00
|
|
|
@@ -147,6 +148,7 @@ pm_perror(char *reason)
|
2001-06-12 23:53:39 -04:00
|
|
|
#if !defined(__EMX__) || defined(__CYGWIN__)
|
|
|
|
extern int errno;
|
|
|
|
#endif
|
2002-02-20 17:56:13 -05:00
|
|
|
+#endif
|
2001-06-12 23:53:39 -04:00
|
|
|
char *e;
|
|
|
|
|
2002-02-20 17:56:13 -05:00
|
|
|
e = sys_errlist[errno];
|
|
|
|
@@ -286,7 +288,7 @@ pbm_readmagicnumber(FILE * file)
|
|
|
|
static int
|
|
|
|
pbm_getint(FILE * file)
|
|
|
|
{
|
|
|
|
- register char ich;
|
|
|
|
+ register int ich;
|
|
|
|
register int i;
|
|
|
|
|
|
|
|
do {
|