chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / _9 / _9base / getcallerpc-use-macro-or-stub.patch
blobd7047a9a997b9a80e460c47f1d07a0439c1f5a87
1 diff --git a/lib9/Makefile b/lib9/Makefile
2 index b83ab2b..2836b38 100644
3 --- a/lib9/Makefile
4 +++ b/lib9/Makefile
5 @@ -145,7 +145,7 @@ LIB9OFILES=\
6 exitcode.o\
7 fcallfmt.o\
8 get9root.o\
9 - getcallerpc-$(OBJTYPE).o\
10 + getcallerpc.o\
11 getenv.o\
12 getfields.o\
13 getnetconn.o\
14 diff --git a/lib9/getcallerpc-386.c b/lib9/getcallerpc-386.c
15 deleted file mode 100644
16 index 1367370..0000000
17 --- a/lib9/getcallerpc-386.c
18 +++ /dev/null
19 @@ -1,7 +0,0 @@
20 -#include <lib9.h>
22 -ulong
23 -getcallerpc(void *x)
25 - return (((ulong*)(x))[-1]);
27 diff --git a/lib9/getcallerpc-PowerMacintosh.c b/lib9/getcallerpc-PowerMacintosh.c
28 deleted file mode 100644
29 index 679a72c..0000000
30 --- a/lib9/getcallerpc-PowerMacintosh.c
31 +++ /dev/null
32 @@ -1,7 +0,0 @@
33 -#include <lib9.h>
35 -ulong
36 -getcallerpc(void *x)
38 - return (((ulong*)(x))[-4]);
40 diff --git a/lib9/getcallerpc-arm.c b/lib9/getcallerpc-arm.c
41 deleted file mode 100644
42 index 9bb4a95..0000000
43 --- a/lib9/getcallerpc-arm.c
44 +++ /dev/null
45 @@ -1,8 +0,0 @@
46 -#include <lib9.h>
48 -ulong
49 -getcallerpc(void *x)
51 - return ((ulong*)x)[-2];
54 diff --git a/lib9/getcallerpc-power.c b/lib9/getcallerpc-power.c
55 deleted file mode 100644
56 index b4bf698..0000000
57 --- a/lib9/getcallerpc-power.c
58 +++ /dev/null
59 @@ -1,11 +0,0 @@
60 -#include <lib9.h>
62 -ulong
63 -getcallerpc(void *x)
65 - ulong *lp;
67 - lp = x;
69 - return lp[-1];
71 diff --git a/lib9/getcallerpc-ppc.c b/lib9/getcallerpc-ppc.c
72 deleted file mode 100644
73 index 679a72c..0000000
74 --- a/lib9/getcallerpc-ppc.c
75 +++ /dev/null
76 @@ -1,7 +0,0 @@
77 -#include <lib9.h>
79 -ulong
80 -getcallerpc(void *x)
82 - return (((ulong*)(x))[-4]);
84 diff --git a/lib9/getcallerpc-x86_64.c b/lib9/getcallerpc-x86_64.c
85 deleted file mode 100644
86 index 1367370..0000000
87 --- a/lib9/getcallerpc-x86_64.c
88 +++ /dev/null
89 @@ -1,7 +0,0 @@
90 -#include <lib9.h>
92 -ulong
93 -getcallerpc(void *x)
95 - return (((ulong*)(x))[-1]);
97 diff --git a/lib9/getcallerpc.c b/lib9/getcallerpc.c
98 new file mode 100644
99 index 0000000..7d2cdd7
100 --- /dev/null
101 +++ b/lib9/getcallerpc.c
102 @@ -0,0 +1,12 @@
103 +#include <lib9.h>
106 + * On gcc and clang, getcallerpc is a macro invoking a compiler builtin.
107 + * If the macro in libc.h did not trigger, there's no implementation.
108 + */
109 +#undef getcallerpc
110 +ulong
111 +getcallerpc(void *v)
113 + return 1;
115 \ No newline at end of file