From d14cc5361f7db7016b7cbb1cc59d8500101d9f27 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 5 Jul 2016 10:16:00 +0200 Subject: doc/_attic_/: Introduce an "_attic_" folder. Move diffs between NoMachine's nx-X11 3.5 and X.org 6.9 here. --- .../nx-X11_lib_Xau_AuRead.c.X.original | 62 ---------------------- 1 file changed, 62 deletions(-) delete mode 100644 doc/nx-X11_vs_XOrg69_patches/nx-X11_lib_Xau_AuRead.c.X.original (limited to 'doc/nx-X11_vs_XOrg69_patches/nx-X11_lib_Xau_AuRead.c.X.original') diff --git a/doc/nx-X11_vs_XOrg69_patches/nx-X11_lib_Xau_AuRead.c.X.original b/doc/nx-X11_vs_XOrg69_patches/nx-X11_lib_Xau_AuRead.c.X.original deleted file mode 100644 index 940a3fee4..000000000 --- a/doc/nx-X11_vs_XOrg69_patches/nx-X11_lib_Xau_AuRead.c.X.original +++ /dev/null @@ -1,62 +0,0 @@ ---- ./nx-X11/lib/Xau/AuRead.c.X.original 2015-02-13 14:03:44.624443872 +0100 -+++ ./nx-X11/lib/Xau/AuRead.c 2015-02-10 19:13:12.488735202 +0100 -@@ -32,14 +32,29 @@ - #endif - #include - #include -+#include - - static int - read_short (unsigned short *shortp, FILE *file) - { - unsigned char file_short[2]; - -- if (fread ((char *) file_short, (int) sizeof (file_short), 1, file) != 1) -- return 0; -+ /* -+ * Added a check on EINTR to prevent the fread() call to be -+ * interrupted by any signal not blocked by OsBlockSignals(). -+ */ -+ -+ for (;;) { -+ if (fread ((char *) file_short, (int) sizeof (file_short), 1, file) != 1) { -+ if (errno == EINTR && ferror (file)) { -+ perror ("Reading from auth file"); -+ clearerr (file); -+ continue; -+ } -+ return 0; -+ } -+ break; -+ } - *shortp = file_short[0] * 256 + file_short[1]; - return 1; - } -@@ -58,11 +73,22 @@ - data = malloc ((unsigned) len); - if (!data) - return 0; -- if (fread (data, (int) sizeof (char), (int) len, file) != len) { -- bzero (data, len); -- free (data); -- return 0; -- } -+ for (;;) -+ { -+ if (fread (data, (int) sizeof (char), (int) len, file) != len) -+ { -+ if (errno == EINTR && ferror (file)) -+ { -+ perror ("Reading from auth file"); -+ clearerr (file); -+ continue; -+ } -+ bzero (data, len); -+ free (data); -+ return 0; -+ } -+ break; -+ } - } - *stringp = data; - *countp = len; -- cgit v1.2.3