From: Tim Kientzle Date: Sat, 22 Jan 2011 07:35:58 +0000 (-0500) Subject: Work around missing wmemcmp() X-Git-Tag: v3.0.0a~728 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1550eb8c48d7663eec899307a588fbb6f0d8a9e6;p=thirdparty%2Flibarchive.git Work around missing wmemcmp() SVN-Revision: 2934 --- diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c index 40bd7b5b7..415917662 100644 --- a/libarchive/archive_acl.c +++ b/libarchive/archive_acl.c @@ -29,6 +29,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_LIMITS_H #include #endif +#ifdef HAVE_WCHAR_H +#include +#endif #include "archive_acl_private.h" #include "archive_entry.h" @@ -37,6 +40,11 @@ __FBSDID("$FreeBSD$"); #undef max #define max(a, b) ((a)>(b)?(a):(b)) +#ifndef HAVE_WMEMCMP +/* Good enough for simple equality testing, but not for sorting. */ +#define wmemcmp(a,b,i) memcmp((a), (b), (i) * sizeof(wchar_t)) +#endif + static int acl_special(struct archive_acl *acl, int type, int permset, int tag); static struct archive_acl_entry *acl_new_entry(struct archive_acl *acl,