This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: IDN support in getaddrinfo().


I get the following warnings compiling the code:

toutf8.c:161: warning: implicit declaration of function `MAX'
toutf8.c:161: warning: implicit declaration of function `MAX'
/cvs/libc/libidn/toutf8.c:161: warning: undefined reference to `MAX'

Ok to commit the appended patch?

Andreas

2004-03-08  Andreas Jaeger  <aj@suse.de>

	* toutf8.c: Define MAX.

============================================================
Index: libidn/toutf8.c
--- libidn/toutf8.c	8 Mar 2004 03:54:02 -0000	1.1
+++ libidn/toutf8.c	8 Mar 2004 06:52:29 -0000
@@ -44,6 +44,13 @@
 #  include <locale.h>
 # endif
 
+#ifndef MAX
+#define MAX(a, b)	({ __typeof__ (a) _a = (a); \
+			   __typeof__ (b) _b = (b); \
+			   _a > _b ? _a : _b; })
+#endif
+
+
 # ifndef _LIBC
 static const char *
 stringprep_locale_charset_slow (void)

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]