From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MS-DOS port broken again Date: Fri, 11 Feb 2022 09:47:59 +0200 Message-ID: <831r09u9n4.fsf@gnu.org> References: <877da2w35w.fsf.ref@yahoo.com> <877da2w35w.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 11 08:51:53 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIQie-0008Ub-Ho for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Feb 2022 08:51:52 +0100 Original-Received: from localhost ([::1]:41318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIQid-0008Lz-89 for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Feb 2022 02:51:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIQf4-00067P-Aj for emacs-devel@gnu.org; Fri, 11 Feb 2022 02:48:11 -0500 Original-Received: from [2001:470:142:3::e] (port=46750 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIQf3-0000d8-VS; Fri, 11 Feb 2022 02:48:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8nMxtHmSy7BCi38FBs6A3xdUvI7sq0akIxRanxkO7QE=; b=CO6W4csD5uxF rSH6ffXDhrx+mNhbm21y379aoyNIbU5veLZAf/lGcumc3DVH8TYK6Icv6AhqUBmG4T+guO2mtTh4h CPLvJ3F2eWt6kT4Q5P4ivA9sYGzUn8yD2OVYNvEWZ72GLGZYXOgiQyXrOJHLfLrmfX3qaV9AaN8Wh VvhOdMeVZQ1fQIsWm3N+uATAjkhiycamhV8sSQrocRdYuXxgrzjb5EXXk2PyqtMEE/nSaTpmQf+I3 UfHVWl2g3Rp+hA/N+aZGp4g5Shxs6DhT4hDdthcVZ+Q0DdUD++3IHpNnL/wqUopd//x9K2R9/XDvA sJKwKXWEaeqbK27wqubDSA==; Original-Received: from [87.69.77.57] (port=1250 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIQew-0004y0-OP; Fri, 11 Feb 2022 02:48:05 -0500 In-Reply-To: <877da2w35w.fsf@yahoo.com> (message from Po Lu on Fri, 11 Feb 2022 10:24:59 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286158 Archived-At: > From: Po Lu > Date: Fri, 11 Feb 2022 10:24:59 +0800 > > After setting up a system to build the MS-DOS port automatically every > two months (which I'm quite proud of), it's broken again: > > ../lib/libgnu.a(regex.o): In function `build_wcs_buffer': > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:238: undefined reference to `_mbrtowc' > ../lib/libgnu.a(regex.o): In function `build_wcs_upper_buffer': > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:382: undefined reference to `_mbrtowc' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:385: undefined reference to `_towupper' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:390: undefined reference to `_wcrtomb' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:382: undefined reference to `_mbrtowc' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:296: undefined reference to `_mbsinit' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:312: undefined reference to `_mbrtowc' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:300: undefined reference to `_towupper' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:317: undefined reference to `_towupper' > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:322: undefined reference to `_wcrtomb' > ../lib/libgnu.a(regex.o): In function `re_string_context_at': > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:916: undefined reference to `_iswalnum' > ../lib/libgnu.a(regex.o): In function `re_string_reconstruct': > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:735: undefined reference to `_mbrtowc' > ../lib/libgnu.a(regex.o): In function `re_string_skip_chars': > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:503: undefined reference to `_mbrtowc' > ../lib/libgnu.a(regex.o): In function `re_string_reconstruct': > c:/djgpp/emacs-29.0.50/lib/regex_internal.c:755: undefined reference to `_iswalnum' > ../lib/libgnu.a(regex.o): In function `re_compile_fastmap_iter': > c:/djgpp/emacs-29.0.50/lib/regcomp.c:309: undefined reference to `_mbrtowc' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:367: undefined reference to `_mbrtowc' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:381: undefined reference to `_wcrtomb' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:385: undefined reference to `_towlower' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:385: undefined reference to `_wcrtomb' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:309: undefined reference to `_towlower' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:309: undefined reference to `_wcrtomb' > ../lib/libgnu.a(regex.o): In function `peek_token': > c:/djgpp/emacs-29.0.50/lib/regcomp.c:1892: undefined reference to `_iswalnum' > c:/djgpp/emacs-29.0.50/lib/regcomp.c:1781: undefined reference to `_iswalnum' > ../lib/libgnu.a(regex.o): In function `parse_byte': > c:/djgpp/emacs-29.0.50/lib/regcomp.c:2627: undefined reference to `_btowc' > ../lib/libgnu.a(regex.o): In function `build_charclass': > c:/djgpp/emacs-29.0.50/lib/regcomp.c:3481: undefined reference to `_wctype' > ../lib/libgnu.a(regex.o): In function `re_compile_internal': > c:/djgpp/emacs-29.0.50/lib/regcomp.c:873: undefined reference to `_btowc' > ../lib/libgnu.a(regex.o): In function `check_node_accept_bytes': > c:/djgpp/emacs-29.0.50/lib/regexec.c:3713: undefined reference to `_iswctype' > > It seems as if gnulib gained a hard dependency on mbrtowc, towupper, and > other related functions. AFAIR, Gnulib tossed support for DJGPP long ago. > The rest of these functions can be defined as macros, but I have no idea > what to do with mbrtowc, nor can I find any documentation on the format > of shift state accepted by DJGPP. DJGPP doesn't support multibyte characters, so you should be able to write a trivial macro to use mbtowc instead of mbrtowc, and similarly for other "stateful" conversion functions. IOW, the mbstate argument to any of these functions has no meaning in DJGPP, and can be freely ignored (which is why you didn't find any documentation of its internal format). The mbstate structure is declared in the DJGPP headers, but that's just a formality (and nice to have to compile sources which reference it). As to where to put these macros: since Gnulib includes src/config.h, and src/config.h includes src/conf_post.h, I would place these macros in the MSDOS section of conf_post.h. Thanks.