3353bf4722
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
17 lines
424 B
Diff
17 lines
424 B
Diff
--- a/x11/compiler.h.old 2018-02-02 17:00:29.174895866 +0000
|
|
+++ b/x11/compiler.h 2018-02-02 17:00:41.199160781 +0000
|
|
@@ -117,12 +117,14 @@
|
|
#define MAX_PATH MAXPATHLEN
|
|
#endif
|
|
|
|
+#ifndef __cplusplus
|
|
#ifndef max
|
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
#endif
|
|
#ifndef min
|
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
#endif
|
|
+#endif /* __cplusplus */
|
|
|
|
#ifndef ZeroMemory
|
|
#define ZeroMemory(d,n) memset((d), 0, (n))
|