1 --- a/squashfs-tools/mksquashfs.c
2 +++ b/squashfs-tools/mksquashfs.c
8 #define __BYTE_ORDER BYTE_ORDER
9 #define __BIG_ENDIAN BIG_ENDIAN
10 #define __LITTLE_ENDIAN LITTLE_ENDIAN
11 #include <sys/sysctl.h>
12 +#endif /* __CYGWIN__ */
15 #include <sys/sysinfo.h>
19 +#include <sys/termios.h>
20 +#define FNM_EXTMATCH (1 << 5)
24 #define FNM_EXTMATCH 0
26 @@ -844,6 +851,7 @@ void sigusr1_handler()
28 void sigwinch_handler()
31 struct winsize winsize;
33 if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
34 @@ -853,6 +861,9 @@ void sigwinch_handler()
37 columns = winsize.ws_col;
44 @@ -4066,6 +4077,9 @@ void initialise_threads(int readb_mbytes
46 signal(SIGUSR1, sigusr1_handler);
49 + processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
51 if(processors == -1) {
54 @@ -4087,6 +4101,7 @@ void initialise_threads(int readb_mbytes
55 processors = sysconf(_SC_NPROCESSORS_ONLN);
58 +#endif /* __CYGWIN__ */
60 thread = malloc((2 + processors * 2) * sizeof(pthread_t));
62 --- a/squashfs-tools/read_fs.c
63 +++ b/squashfs-tools/read_fs.c
69 #define __BYTE_ORDER BYTE_ORDER
70 #define __BIG_ENDIAN BIG_ENDIAN
71 #define __LITTLE_ENDIAN LITTLE_ENDIAN
76 --- a/squashfs-tools/swap.c
77 +++ b/squashfs-tools/swap.c
83 #define __BYTE_ORDER BYTE_ORDER
84 #define __BIG_ENDIAN BIG_ENDIAN
85 #define __LITTLE_ENDIAN LITTLE_ENDIAN
90 --- a/squashfs-tools/unsquashfs.c
91 +++ b/squashfs-tools/unsquashfs.c
92 @@ -117,6 +117,7 @@ void update_progress_bar();
94 void sigwinch_handler()
97 struct winsize winsize;
99 if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
100 @@ -126,6 +127,9 @@ void sigwinch_handler()
103 columns = winsize.ws_col;
110 @@ -1807,7 +1811,9 @@ void initialise_threads(int fragment_buf
111 if(sigprocmask(SIG_BLOCK, &sigmask, &old_mask) == -1)
112 EXIT_UNSQUASH("Failed to set signal mask in intialise_threads"
116 + processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
118 if(processors == -1) {
121 @@ -1829,6 +1835,7 @@ void initialise_threads(int fragment_buf
122 processors = sysconf(_SC_NPROCESSORS_ONLN);
125 +#endif /* __CYGWIN__ */
127 thread = malloc((3 + processors) * sizeof(pthread_t));
129 --- a/squashfs-tools/unsquashfs.h
130 +++ b/squashfs-tools/unsquashfs.h
132 #include <sys/time.h>
136 #define __BYTE_ORDER BYTE_ORDER
137 #define __BIG_ENDIAN BIG_ENDIAN
138 #define __LITTLE_ENDIAN LITTLE_ENDIAN
139 #include <sys/sysctl.h>
143 #include <sys/sysinfo.h>
147 +#include <sys/termios.h>
148 +#define FNM_EXTMATCH (1 << 5)
152 #define FNM_EXTMATCH 0