Taken from Debian, necessary for compilation on mips. Patch to fix integer types problem by Goswin von Brederlow (#258444) --- chmlib-0.39.orig/src/chm_lib.c +++ chmlib-0.39/src/chm_lib.c @@ -56,6 +56,7 @@ #include "lzx.h" +#include #include #include #ifdef CHM_DEBUG @@ -149,22 +150,9 @@ typedef __int64 Int64; typedef unsigned __int64 UInt64; -/* I386, 32-bit, non-Windows */ -/* Sparc */ -/* MIPS */ -/* PPC */ -#elif __i386__ || __sun || __sgi || __ppc__ -typedef unsigned char UChar; -typedef short Int16; -typedef unsigned short UInt16; -typedef long Int32; -typedef unsigned long UInt32; -typedef long long Int64; -typedef unsigned long long UInt64; - /* x86-64 */ /* Note that these may be appropriate for other 64-bit machines. */ -#elif __x86_64__ || __ia64__ +#elif defined(__LP64__) typedef unsigned char UChar; typedef short Int16; typedef unsigned short UInt16; @@ -173,10 +161,18 @@ typedef long Int64; typedef unsigned long UInt64; +/* I386, 32-bit, non-Windows */ +/* Sparc */ +/* MIPS */ +/* PPC */ #else - -/* yielding an error is preferable to yielding incorrect behavior */ -#error "Please define the sized types for your platform in chm_lib.c" +typedef unsigned char UChar; +typedef short Int16; +typedef unsigned short UInt16; +typedef long Int32; +typedef unsigned long UInt32; +typedef long long Int64; +typedef unsigned long long UInt64; #endif /* GCC */ 446af9e'/>
AgeCommit message (Collapse)Author
2019-10-16daemon: Make 'profiles/per-user' non-world-writable.Ludovic Courtès
Fixes <https://bugs.gnu.org/37744>. Reported at <https://www.openwall.com/lists/oss-security/2019/10/09/4>. Based on Nix commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d by Eelco Dolstra <edolstra@gmail.com>. * nix/libstore/local-store.cc (LocalStore::LocalStore): Set 'perUserDir' to #o755 instead of #o1777. (LocalStore::createUser): New function. * nix/libstore/local-store.hh (LocalStore): Add it. * nix/libstore/store-api.hh (StoreAPI): Add it. * nix/nix-daemon/nix-daemon.cc (performOp): In 'wopSetOptions', add condition to handle "user-name" property and honor it. (processConnection): Add 'userId' parameter. Call 'store->createUser' when userId is not -1. * guix/profiles.scm (ensure-profile-directory): Note that this is now handled by the daemon. * guix/store.scm (current-user-name): New procedure. (set-build-options): Add #:user-name parameter and pass it to the daemon. * tests/guix-daemon.sh: Test the creation of 'profiles/per-user' when listening on a TCP socket. * tests/store.scm ("profiles/per-user exists and is not writable") ("profiles/per-user/$USER exists"): New tests.