summaryrefslogtreecommitdiff
blob: f076ffd7f5c1ef5ea6bc1e84520d747b93d806a5 (plain)
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
Only in zsnes_1_50/src: aclocal.m4
Only in zsnes_1_50/src: autom4te.cache
Only in zsnes_1_50/src: config.h
Only in zsnes_1_50/src: config.log
Only in zsnes_1_50/src: config.status
Only in zsnes_1_50.orig/src: configure
diff -ur zsnes_1_50.orig/src/configure.in zsnes_1_50/src/configure.in
--- zsnes_1_50.orig/src/configure.in	2007-01-13 00:24:30.000000000 +0100
+++ zsnes_1_50/src/configure.in	2007-01-13 00:27:50.000000000 +0100
@@ -76,6 +76,7 @@
 AM_PATH_ZLIB(1.2.3,,[AC_MSG_ERROR(zlib >= 1.2.3 is required)])
 CFLAGS="$CFLAGS $ZLIB_CFLAGS"
 LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+AC_CHECK_FUNCS(gzdirect)
 
 dnl - libpng stuff
 AM_PATH_LIBPNG(1.2.0,,)
diff -ur zsnes_1_50.orig/src/initc.c zsnes_1_50/src/initc.c
--- zsnes_1_50.orig/src/initc.c	2007-01-13 00:24:30.000000000 +0100
+++ zsnes_1_50/src/initc.c	2007-01-13 00:38:25.000000000 +0100
@@ -831,6 +831,35 @@
   }
 }
 
+#ifndef HAVE_GZDIRECT
+typedef struct gz_stream {
+  z_stream stream;
+  int      z_err;   /* error code for last stream operation */
+  int      z_eof;   /* set if end of input file */
+  FILE     *file;   /* .gz file */
+  Byte     *inbuf;  /* input buffer */
+  Byte     *outbuf; /* output buffer */
+  uLong    crc;     /* crc32 of uncompressed data */
+  char     *msg;    /* error message */
+  char     *path;   /* path name for debugging only */
+  int      transparent; /* 1 if input file is not a .gz file */
+  char     mode;    /* 'w' or 'r' */
+  z_off_t  start;   /* start of compressed data in file (header skipped) */
+  z_off_t  in;      /* bytes into deflate or inflate */
+  z_off_t  out;     /* bytes out of deflate or inflate */
+  int      back;    /* one character push-back */
+  int      last;    /* true if push-back is last character */
+} gz_stream;
+
+int gzdirect (gzFile file)
+{
+  gz_stream *s = (gz_stream*)file;
+
+  if (s == NULL || s->mode != 'r') return 0;
+  return s->transparent;
+}
+#endif
+
 void loadGZipFile(char *filename)
 {
   //Open file for size reading
Only in zsnes_1_50/src: Makefile
Only in zsnes_1_50/src: makefile.dep
Only in zsnes_1_50/src/tools: fileutil.o
Only in zsnes_1_50/src/tools: strutil.o