]> arthur.barton.de Git - netatalk.git/commitdiff
fix solaris compile issue
authorbfernhomberg <bfernhomberg>
Thu, 30 Oct 2003 01:17:26 +0000 (01:17 +0000)
committerbfernhomberg <bfernhomberg>
Thu, 30 Oct 2003 01:17:26 +0000 (01:17 +0000)
include/atalk/unicode.h

index 7874b75f2eb211400eb40b63a1960a61a311c331..bdb217528d0ac0339ed693f05e213160a0b7ed7d 100644 (file)
@@ -2,9 +2,20 @@
 #ifndef _ATALK_UNICODE_H
 #define _ATALK_UNICODE_H 1
 
+#include <sys/cdefs.h>
 #include <atalk/list.h>
 
-#define ucs2_t u_int16_t
+#define ucs2_t u_int16_t
+
+#ifndef MIN
+#define MIN(a,b)     ((a)<(b)?(a):(b))
+#endif /* ! MIN */
+
+#ifndef MAX
+#define MAX(a,b)     ((a)>(b)?(a):(b))
+#endif /* ! MIN */
+
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
 
 /* generic iconv conversion structure */
 typedef struct {
@@ -120,6 +131,5 @@ extern size_t       utf8_decompose  __P(( char *, size_t, char *, size_t));
 extern charset_t add_charset __P((char* name));
 
 
-#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
 
 #endif