public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: define MIN in dl-machine.h
@ 2017-10-04 11:35 Szabolcs Nagy
  2017-10-04 12:59 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Szabolcs Nagy @ 2017-10-04 11:35 UTC (permalink / raw)
  To: GNU C Library; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

MIN is used, but param.h may not be included. Define MIN explicitly
because param.h has lots of legacy macro definitions so it should
not be used.

(needed for hjl/pie/static branch)
(will commit this soon)

2017-10-04  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* sysdeps/aarch64/dl-machine.h (MIN): Define.

[-- Attachment #2: min.diff --]
[-- Type: text/x-patch, Size: 481 bytes --]

diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 60472036f5..d53a8be235 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -27,6 +27,10 @@
 #include <dl-irel.h>
 #include <cpu-features.c>
 
+#ifndef MIN
+# define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+
 /* Return nonzero iff ELF header is compatible with the running host.  */
 static inline int __attribute__ ((unused))
 elf_machine_matches_host (const ElfW(Ehdr) *ehdr)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] aarch64: define MIN in dl-machine.h
  2017-10-04 11:35 [PATCH] aarch64: define MIN in dl-machine.h Szabolcs Nagy
@ 2017-10-04 12:59 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2017-10-04 12:59 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: GNU C Library, nd

There is only one use of MIN, perhaps expand it there?

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-04 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04 11:35 [PATCH] aarch64: define MIN in dl-machine.h Szabolcs Nagy
2017-10-04 12:59 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).