python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / libx86 / non-x86.patch
blob286057c4ba87912670d63112cf02fcd9544af398
1 diff -Naur libx86-1.1+ds1.orig/Makefile libx86-1.1+ds1/Makefile
2 --- libx86-1.1+ds1.orig/Makefile 2008-05-19 12:28:59.000000000 +0300
3 +++ libx86-1.1+ds1/Makefile 2012-02-20 01:32:03.750068423 +0200
4 @@ -5,6 +5,7 @@
5 ifeq ($(BACKEND),x86emu)
6 OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
7 x86emu/ops.o x86emu/ops2.o x86emu/prim_ops.o x86emu/sys.o
8 + CFLAGS += -DX86EMU -fno-delete-null-pointer-checks
9 else
10 OBJECTS += lrmi.o
11 endif
12 diff -Naur libx86-1.1+ds1.orig/thunk.c libx86-1.1+ds1/thunk.c
13 --- libx86-1.1+ds1.orig/thunk.c 2008-04-03 03:48:00.000000000 +0300
14 +++ libx86-1.1+ds1/thunk.c 2012-02-20 01:12:56.468820192 +0200
15 @@ -32,6 +32,7 @@
16 #define TRUE 1
17 #define FALSE 0
19 +#ifndef X86EMU
20 #define __BUILDIO(bwl,bw,type) \
21 static inline void out##bwl##_local(unsigned long port, unsigned type value) { __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \
23 @@ -44,6 +45,15 @@
24 __BUILDIO(b,b,char)
25 __BUILDIO(w,w,short)
26 __BUILDIO(l,,int)
27 +#else
28 +/* use libc functions */
29 +#define inb_local inb
30 +#define inw_local inw
31 +#define inl_local inl
32 +#define outb_local outb
33 +#define outw_local outw
34 +#define outl_local outl
35 +#endif /* X86EMU */
38 char *mmap_addr = SHMERRORPTR;