void-packages/srcpkgs/afterstep/patches/50-cross-safe-min-max.patch
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```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
```
2021-06-20 13:17:29 +07:00

18 lines
804 B
Diff

diff --git libAfterBase/configure.in libAfterBase/configure.in
index 4bc2232..f250692 100644
--- a/libAfterBase/configure.in
+++ b/libAfterBase/configure.in
@@ -228,12 +228,7 @@ if test "x$enable_xlocale" = "xyes"; then
fi
dnl# Check for safe min/max - there still are some retarded compilers out there :
-AC_MSG_CHECKING(if we can use sign safe min/max macros)
-AC_TRY_RUN([#define MIN(x,y) \
- ({ const typeof(x) _x = (x); const typeof(y) _y = (y); (void) (&_x == &_y); \
- _x < _y ? _x : _y; })
- int main(){return MIN(0,1);}],
- [AC_DEFINE(USE_SAFE_MINMAX,1,will use type-safe min/max macros) AC_MSG_RESULT(yes)],AC_MSG_RESULT(no))
+AC_DEFINE(USE_SAFE_MINMAX,1,will use type-safe min/max macros)
dnl# Translate enable_* from "yes/no" to "1/0" (for configure.h)