From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Interest in nt_load_image? Date: Tue, 31 Mar 2020 17:19:44 +0300 Message-ID: <83o8sc1u9r.fsf@gnu.org> References: <86369r0xcv.fsf@csic.es> <83k1324m60.fsf@gnu.org> <86imimwa4t.fsf@csic.es> <838sji3qhx.fsf@gnu.org> <86lfnhsyei.fsf@csic.es> <83v9ml3kpx.fsf@gnu.org> <86r1x9rf7w.fsf@csic.es> <83pnct3ikf.fsf@gnu.org> <83imil3d8r.fsf@gnu.org> <83blod3c26.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="93534"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juanjose.garciaripoll@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 31 16:20:11 2020 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 1jJHkQ-000OFf-J2 for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 16:20:10 +0200 Original-Received: from localhost ([::1]:38838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJHkP-0001xJ-Jf for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 10:20:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49994) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJHjq-00019j-UP for emacs-devel@gnu.org; Tue, 31 Mar 2020 10:19:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jJHjq-0000Nn-IE; Tue, 31 Mar 2020 10:19:34 -0400 Original-Received: from [176.228.60.248] (port=1147 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jJHjp-0004ZA-Jk; Tue, 31 Mar 2020 10:19:34 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 30 Mar 2020 15:39:11 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:246099 Archived-At: > From: Stefan Monnier > Cc: juanjose.garciaripoll@gmail.com, emacs-devel@gnu.org > Date: Mon, 30 Mar 2020 15:39:11 -0400 > > I suggest we write the code under the assumption that GDI+ is available > and that's it. I'd like to have a Lisp knob to select whether GDI+ or the various image libraries are used for image handling, so the for systems without GDI+ comes at almost no cost: just determine at startup what is/are the value(s) of those variable(s). > > There are no consequences. The paradigm of loading a shared library > > dynamically and testing whether doing that succeeded is so boilerplate > > in the w32 code that it never takes more than a simple copy/pasta to > > add one more. > > But what do we do if the loading fails? If we simply fail to display > the image, then that's fine by me. If OTOH we go through the trouble of > falling back on some other code which otherwise wouldn't be needed in > the build (and would hence never be tested, BTW), then it sounds like > "waste precious resources". If the library cannot be loaded, or doesn't have all the required functions, the corresponding feature becomes unavailable, and we will generally display an error message. This is clearly visible in the code: that's what those FOO-available-p functions are there for. In some rare cases, where we already have a fallback, we use it instead. But those cases are a small minority. > >> > One day it will die of natural causes, no need to invest even > >> > a minimal effort in that. > >> I'm not sure how that would happen > > It will happen when 32-bit builds will die. 2038 at the latest. > > Are we sure sure 32bit Windows installations will have all disappeared > by 2038 ? ;-) Yes, I'm sure. In any case, Emacs will not be able to run on them, as we use time functions all over the place.