From owner-svn-src-head@freebsd.org Thu Oct 5 06:39:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB43EE2E3FC; Thu, 5 Oct 2017 06:39:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F0AF2A88; Thu, 5 Oct 2017 06:39:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v956dve3091548; Thu, 5 Oct 2017 06:39:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v956dvvK091547; Thu, 5 Oct 2017 06:39:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201710050639.v956dvvK091547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 5 Oct 2017 06:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324292 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua X-SVN-Commit-Revision: 324292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 06:39:58 -0000 Author: avg Date: Thu Oct 5 06:39:57 2017 New Revision: 324292 URL: https://svnweb.freebsd.org/changeset/base/324292 Log: really unbreak kernel builds on sparc64 and powerpc64 after r324163, ZFS Channel Programs This commit also reverts r324178 that did not fix the problem on powerpc64 where char is usigned. MFC after: 4 weeks X-MFC with: r324163 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c Wed Oct 4 23:35:10 2017 (r324291) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c Thu Oct 5 06:39:57 2017 (r324292) @@ -35,10 +35,11 @@ #ifdef illumos #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C)) #define toupper(C) (((C) >= 'a' && (C) <= 'z') ? (C) - 'a' + 'A': (C)) +#define iscntrl(C) ((((C) >= 0) && ((C) <= 0x1f)) || ((C) == 0x7f)) #else #define isalnum(C) (isalpha(C) || isdigit(C)) +#define iscntrl(C) (uchar(C) <= 0x1f || uchar(C) == 0x7f) #endif -#define iscntrl(C) ((((C) >= 0) && ((C) <= 0x1f)) || ((C) == 0x7f)) #define isgraph(C) ((C) >= 0x21 && (C) <= 0x7E) #define ispunct(C) (((C) >= 0x21 && (C) <= 0x2F) || \ ((C) >= 0x3A && (C) <= 0x40) || \ @@ -867,7 +868,7 @@ static void addquoted (lua_State *L, luaL_Buffer *b, i luaL_addchar(b, '\\'); luaL_addchar(b, *s); } - else if (*s == '\0' || iscntrl(*s)) { + else if (*s == '\0' || iscntrl(uchar(*s))) { char buff[10]; if (!isdigit(uchar(*(s+1)))) sprintf(buff, "\\%d", (int)uchar(*s));