1 diff -urN squashfs4.0/squashfs-tools/global.h squashfs4.0.new/squashfs-tools/global.h
2 --- squashfs4.0/squashfs-tools/global.h 2009-08-27 21:33:03.000000000 +0200
3 +++ squashfs4.0.new/squashfs-tools/global.h 2009-08-27 21:36:38.000000000 +0200
5 typedef squashfs_inode_t squashfs_inode;
6 typedef squashfs_block_t squashfs_block;
9 +#include <sys/termios.h>
10 +#define FNM_EXTMATCH (1 << 5)
14 #define FNM_EXTMATCH 0
16 diff -urN squashfs4.0/squashfs-tools/mksquashfs.c squashfs4.0.new/squashfs-tools/mksquashfs.c
17 --- squashfs4.0/squashfs-tools/mksquashfs.c 2009-08-27 21:33:06.000000000 +0200
18 +++ squashfs4.0.new/squashfs-tools/mksquashfs.c 2009-08-27 21:37:22.000000000 +0200
24 #define __BYTE_ORDER BYTE_ORDER
25 #define __BIG_ENDIAN BIG_ENDIAN
26 #define __LITTLE_ENDIAN LITTLE_ENDIAN
27 #include <sys/sysctl.h>
28 +#endif /* __CYGWIN__ */
31 #include <sys/sysinfo.h>
34 void sigwinch_handler()
37 struct winsize winsize;
39 if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
43 columns = winsize.ws_col;
51 BAD_ERROR("Failed to set signal mask in intialise_threads\n");
53 signal(SIGUSR1, sigusr1_handler);
56 + processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
58 if(processors == -1) {
62 processors = get_nprocs();
65 +#endif /* __CYGWIN__ */
67 if((thread = malloc((2 + processors * 2) * sizeof(pthread_t))) == NULL)
68 BAD_ERROR("Out of memory allocating thread descriptors\n");
69 diff -urN squashfs4.0/squashfs-tools/read_fs.c squashfs4.0.new/squashfs-tools/read_fs.c
70 --- squashfs4.0/squashfs-tools/read_fs.c 2009-08-27 21:33:06.000000000 +0200
71 +++ squashfs4.0.new/squashfs-tools/read_fs.c 2009-08-27 21:41:54.000000000 +0200
77 #define __BYTE_ORDER BYTE_ORDER
78 #define __BIG_ENDIAN BIG_ENDIAN
79 #define __LITTLE_ENDIAN LITTLE_ENDIAN
84 diff -urN squashfs4.0/squashfs-tools/swap.c squashfs4.0.new/squashfs-tools/swap.c
85 --- squashfs4.0/squashfs-tools/swap.c 2009-03-26 05:40:16.000000000 +0100
86 +++ squashfs4.0.new/squashfs-tools/swap.c 2009-08-27 21:44:52.000000000 +0200
92 #define __BYTE_ORDER BYTE_ORDER
93 #define __BIG_ENDIAN BIG_ENDIAN
94 #define __LITTLE_ENDIAN LITTLE_ENDIAN
99 diff -urN squashfs4.0/squashfs-tools/unsquashfs.c squashfs4.0.new/squashfs-tools/unsquashfs.c
100 --- squashfs4.0/squashfs-tools/unsquashfs.c 2009-08-27 21:33:06.000000000 +0200
101 +++ squashfs4.0.new/squashfs-tools/unsquashfs.c 2009-08-27 21:41:38.000000000 +0200
104 void sigwinch_handler()
107 struct winsize winsize;
109 if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
113 columns = winsize.ws_col;
120 @@ -1794,7 +1798,9 @@
121 if(sigprocmask(SIG_BLOCK, &sigmask, &old_mask) == -1)
122 EXIT_UNSQUASH("Failed to set signal mask in intialise_threads"
126 + processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
128 if(processors == -1) {
131 @@ -1816,6 +1822,7 @@
132 processors = get_nprocs();
135 +#endif /* __CYGWIN__ */
137 if((thread = malloc((3 + processors) * sizeof(pthread_t))) == NULL)
138 EXIT_UNSQUASH("Out of memory allocating thread descriptors\n");
139 diff -urN squashfs4.0/squashfs-tools/unsquashfs.h squashfs4.0.new/squashfs-tools/unsquashfs.h
140 --- squashfs4.0/squashfs-tools/unsquashfs.h 2009-08-27 21:33:03.000000000 +0200
141 +++ squashfs4.0.new/squashfs-tools/unsquashfs.h 2009-08-27 21:44:17.000000000 +0200
143 #include <sys/time.h>
147 #define __BYTE_ORDER BYTE_ORDER
148 #define __BIG_ENDIAN BIG_ENDIAN
149 #define __LITTLE_ENDIAN LITTLE_ENDIAN
150 #include <sys/sysctl.h>
151 +#endif /* __CYGWIN__ */
154 #include <sys/sysinfo.h>