* Emacs pretest 28.0.90 is out @ 2021-12-02 22:41 Stefan Kangas 2021-12-05 3:38 ` Po Lu ` (3 more replies) 0 siblings, 4 replies; 65+ messages in thread From: Stefan Kangas @ 2021-12-02 22:41 UTC (permalink / raw) To: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1169 bytes --] Hi! The first pretest for what will be the 28.1 release of Emacs (the extensible text editor) is available at: https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz The tarball is signed; you can get the PGP signature file at: https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz.sig Please give it as much testing as you can. As always, if you encounter problems building or using Emacs, send a report to bug-gnu-emacs@gnu.org with full details (if possible, use M-x report-emacs-bug). Thanks for helping to test Emacs. -------------------------------------- To verify that the tarball is intact, download both the .sig and the tarball, and run this command: gpg --verify emacs-28.0.90.tar.xz.sig If that command fails because you don't have the required public key, run this command to import it: gpg --keyserver keys.openpgp.org --recv-keys \ CEA1DE21AB108493CC9C65742E82323B8F4353EE You can also run sha1sum or sha256sum and confirm that these checksums match: SHA1 emacs-28.0.90.tar.xz 7f824b6c7ea4a98baf86a97eea8c33f0029aab4e SHA256 emacs-28.0.90.tar.xz 6f10c72f9358fe1e39c761faf84bc1e5d81fb848f282c95bec34a9a77bc16288 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --] ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-02 22:41 Emacs pretest 28.0.90 is out Stefan Kangas @ 2021-12-05 3:38 ` Po Lu 2021-12-05 8:00 ` Eli Zaretskii 2021-12-05 3:42 ` David O'Toole ` (2 subsequent siblings) 3 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-05 3:38 UTC (permalink / raw) To: emacs-devel Stefan Kangas <stefan@marxist.se> writes: > Hi! > > The first pretest for what will be the 28.1 release of Emacs (the > extensible text editor) is available at: > > https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz > > The tarball is signed; you can get the PGP signature file at: > > https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz.sig > > Please give it as much testing as you can. > > As always, if you encounter problems building or using Emacs, > send a report to bug-gnu-emacs@gnu.org with full details > (if possible, use M-x report-emacs-bug). > > Thanks for helping to test Emacs. > > -------------------------------------- I tried building this on FreeDOS, but DJGPP sed complains that some patterns don't match in Makefile.in after running config.bat. Am I missing something or is the DOS port unsupported now? It would be a shame for the latter to be the case. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 3:38 ` Po Lu @ 2021-12-05 8:00 ` Eli Zaretskii 2021-12-05 10:34 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-05 8:00 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Date: Sun, 05 Dec 2021 11:38:52 +0800 > > I tried building this on FreeDOS, but DJGPP sed complains that some > patterns don't match in Makefile.in after running config.bat. > > Am I missing something or is the DOS port unsupported now? It would be > a shame for the latter to be the case. Patches to make MSDOS port of Emacs 28 build will be most welcome. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 8:00 ` Eli Zaretskii @ 2021-12-05 10:34 ` Po Lu 2021-12-05 10:59 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-05 10:34 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Po Lu <luangruo@yahoo.com> >> Date: Sun, 05 Dec 2021 11:38:52 +0800 >> >> I tried building this on FreeDOS, but DJGPP sed complains that some >> patterns don't match in Makefile.in after running config.bat. >> >> Am I missing something or is the DOS port unsupported now? It would be >> a shame for the latter to be the case. > Patches to make MSDOS port of Emacs 28 build will be most welcome. I have no idea how to navigate around the strange build system of the DOS port that appears to be sed-based. But I think I can make it work with autoconf. Will such a change be okay for the release branch? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 10:34 ` Po Lu @ 2021-12-05 10:59 ` Eli Zaretskii 2021-12-05 11:18 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-05 10:59 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Sun, 05 Dec 2021 18:34:31 +0800 > > > Patches to make MSDOS port of Emacs 28 build will be most welcome. > > I have no idea how to navigate around the strange build system of the > DOS port that appears to be sed-based. I can help with that. The Sed scripts are all invoked by the script config.bat that is in the top-level directory. See msdos/README. > But I think I can make it work with autoconf. Not recommended: the Emacs configury and the top-level Makefile.in were never made to DTRT for the DOS port, so I presume you will have a lot of obstacles to negotiate. > Will such a change be okay for the release branch? Depends on how many changes will be needed. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 10:59 ` Eli Zaretskii @ 2021-12-05 11:18 ` Po Lu 2021-12-05 11:24 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-05 11:18 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Po Lu <luangruo@yahoo.com> >> Cc: emacs-devel@gnu.org >> Date: Sun, 05 Dec 2021 18:34:31 +0800 >> >> > Patches to make MSDOS port of Emacs 28 build will be most welcome. >> >> I have no idea how to navigate around the strange build system of the >> DOS port that appears to be sed-based. > > I can help with that. The Sed scripts are all invoked by the script > config.bat that is in the top-level directory. See msdos/README. Thanks. The first obstacle here is that lib/Makefile is being generated like such: @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in-h @GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ @GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in-h >> $@-t @GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t @GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ The @GL_GENERATE_ALLOCA_H_* parts should have been replaced by sedlibmk.inp, correct? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 11:18 ` Po Lu @ 2021-12-05 11:24 ` Eli Zaretskii 2021-12-05 11:30 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-05 11:24 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Sun, 05 Dec 2021 19:18:12 +0800 > > @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in-h > @GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ > @GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ > @GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in-h >> $@-t > @GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t > @GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ > @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: > @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ > > The @GL_GENERATE_ALLOCA_H_* parts should have been replaced by > sedlibmk.inp, correct? Yes. The DOS build shouldn't need Gnulib's alloca.h. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 11:24 ` Eli Zaretskii @ 2021-12-05 11:30 ` Po Lu 2021-12-05 13:48 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-05 11:30 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Po Lu <luangruo@yahoo.com> >> Cc: emacs-devel@gnu.org >> Date: Sun, 05 Dec 2021 19:18:12 +0800 >> >> @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in-h >> @GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ >> @GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ >> @GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in-h >> $@-t >> @GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t >> @GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ >> @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: >> @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ >> >> The @GL_GENERATE_ALLOCA_H_* parts should have been replaced by >> sedlibmk.inp, correct? > > Yes. The DOS build shouldn't need Gnulib's alloca.h. Thanks. It seems that this part of sedlibmk.inp is supposed to get rid of those: s/= @GL_GENERATE_ALLOCA_H@/= 1/ s/= @GL_GENERATE_BYTESWAP_H@/= 1/ s/= @GL_GENERATE_EXECINFO_H@/= 1/ s/= @GL_GENERATE_STDALIGN_H@/= 1/ s/= @GL_GENERATE_STDDEF_H@/= 1/ s/= @GL_GENERATE_STDINT_H@/= 1/ s/= @GL_GENERATE_LIMITS_H@/= 1/ s/= @GL_GENERATE_ERRNO_H@/= / s/= @GL_GENERATE_LIMITS_H@/= / But they are only effective for @GL_GENERATE_ALLOC_H@, which I take to have changed into @GL_GENERATE_ALLOCA_H_TRUE@ and @GL_GENERATE_ALLOCA_H_FALSE@ in gnulib? Or am I missing something? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 11:30 ` Po Lu @ 2021-12-05 13:48 ` Eli Zaretskii 2021-12-06 0:53 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-05 13:48 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Sun, 05 Dec 2021 19:30:31 +0800 > > >> The @GL_GENERATE_ALLOCA_H_* parts should have been replaced by > >> sedlibmk.inp, correct? > > > > Yes. The DOS build shouldn't need Gnulib's alloca.h. > > Thanks. It seems that this part of sedlibmk.inp is supposed to get rid > of those: > > s/= @GL_GENERATE_ALLOCA_H@/= 1/ > s/= @GL_GENERATE_BYTESWAP_H@/= 1/ > s/= @GL_GENERATE_EXECINFO_H@/= 1/ > s/= @GL_GENERATE_STDALIGN_H@/= 1/ > s/= @GL_GENERATE_STDDEF_H@/= 1/ > s/= @GL_GENERATE_STDINT_H@/= 1/ > s/= @GL_GENERATE_LIMITS_H@/= 1/ > s/= @GL_GENERATE_ERRNO_H@/= / > s/= @GL_GENERATE_LIMITS_H@/= / No, those are for lines like this: GL_GENERATE_ALLOCA_H = @GL_GENERATE_ALLOCA_H@ > But they are only effective for @GL_GENERATE_ALLOC_H@, which I take to > have changed into @GL_GENERATE_ALLOCA_H_TRUE@ and > @GL_GENERATE_ALLOCA_H_FALSE@ in gnulib? Or am I missing something? Yes, I think the problem is that you are building from the repository. You should build a pretest tarball instead. The support for building from the repository was not tested in many years, and has probably bit-rotten quite a lot. The tarball shouldn't have the msdos/autogen/ directory. It does have it now, but that is a mistake. So unpack the tarball and delete msdos/autogen/ with all its contents, then try again. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 13:48 ` Eli Zaretskii @ 2021-12-06 0:53 ` Po Lu 2021-12-06 12:49 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-06 0:53 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > The tarball shouldn't have the msdos/autogen/ directory. It does have > it now, but that is a mistake. So unpack the tarball and delete > msdos/autogen/ with all its contents, then try again. Thanks, here's an even more odd problem: make now segfaults with the following backtrace. Exiting due to signal SIGSEGV General Protection Fault at eip=0002affd eax=00149c88 ebx=00000001 ecx=00000001 edx=6f746567 esi=00000006 edi=000000b2 ebp=000d9818 esp=000d9810 program=c:\djgpp\bin\make.exe cs: sel=01ff base=02bd0000 limit=0014ffff ds: sel=0207 base=02bd0000 limit=0014ffff es: sel=0207 base=02bd0000 limit=0014ffff fs: sel=01d7 base=0000ada0 limit=0000ffff gs: sel=0217 base=00000000 limit=0010ffff ss: sel=0207 base=02bd0000 limit=0014ffff App stack: [000daa50..0005aa50] Exceptn stack: [0005a96c..00058a2c] Call frame traceback EIPs: 0x0002affd 0x0002b584 0x00025913 0x00026816 0x0001a8eb 0x00009f92 0x0000afe3 0x0000b290 0x000058a7 0x00005d93 0x00005e5a 0x000056b8 0x00005c4d 0x0001cdbf 0x0001d266 0x0001d569 0x000159de 0x000343e4 make: *** [Makefile:87: lib] Error -1 FWIW, I'm using Windows XP SP3 with Make 4.3 from djgpp. I will try to debug that, but if it's a known problem, please let me know. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-06 0:53 ` Po Lu @ 2021-12-06 12:49 ` Eli Zaretskii 2021-12-06 13:26 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-06 12:49 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Mon, 06 Dec 2021 08:53:04 +0800 > > Thanks, here's an even more odd problem: make now segfaults with the > following backtrace. > > Exiting due to signal SIGSEGV > General Protection Fault at eip=0002affd > eax=00149c88 ebx=00000001 ecx=00000001 edx=6f746567 esi=00000006 edi=000000b2 > ebp=000d9818 esp=000d9810 program=c:\djgpp\bin\make.exe > cs: sel=01ff base=02bd0000 limit=0014ffff > ds: sel=0207 base=02bd0000 limit=0014ffff > es: sel=0207 base=02bd0000 limit=0014ffff > fs: sel=01d7 base=0000ada0 limit=0000ffff > gs: sel=0217 base=00000000 limit=0010ffff > ss: sel=0207 base=02bd0000 limit=0014ffff > App stack: [000daa50..0005aa50] Exceptn stack: [0005a96c..00058a2c] > > Call frame traceback EIPs: > 0x0002affd > 0x0002b584 > 0x00025913 > 0x00026816 > 0x0001a8eb > 0x00009f92 > 0x0000afe3 > 0x0000b290 > 0x000058a7 > 0x00005d93 > 0x00005e5a > 0x000056b8 > 0x00005c4d > 0x0001cdbf > 0x0001d266 > 0x0001d569 > 0x000159de > 0x000343e4 > make: *** [Makefile:87: lib] Error -1 > > FWIW, I'm using Windows XP SP3 with Make 4.3 from djgpp. I was using Make 4.1, you can find it here: http://www.delorie.com/pub/djgpp/deleted/v2gnu/mak41br2.zip And if we are talking versions, then you may bump into problems with latest GCC versions. If so, try the versions I used: GCC 3.4.6 Binutils 2.26 GDB 7.2 > I will try to debug that, but if it's a known problem, please let me > know. It's hard to know if it's a known problem, but I never used that version of Make in its DJGPP port. Is the crash reproducible? If so, what recipe in lib/Makefile crashes it? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-06 12:49 ` Eli Zaretskii @ 2021-12-06 13:26 ` Po Lu 2021-12-06 13:41 ` Po Lu 2021-12-06 13:55 ` Eli Zaretskii 0 siblings, 2 replies; 65+ messages in thread From: Po Lu @ 2021-12-06 13:26 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > I was using Make 4.1, you can find it here: > > http://www.delorie.com/pub/djgpp/deleted/v2gnu/mak41br2.zip I will try that, thanks. > And if we are talking versions, then you may bump into problems with > latest GCC versions. If so, try the versions I used: > > GCC 3.4.6 > GDB 7.2 These versions are what I have installed, but see below: > Binutils 2.26 I used binutils 2.37, because I couldn't find 2.26 on the djgpp download server. Could you tell me where I can obtain binutils 2.26 for DJGPP? > It's hard to know if it's a known problem, but I never used that > version of Make in its DJGPP port. Is the crash reproducible? If so, > what recipe in lib/Makefile crashes it? I will try to find out, but the priority for me is to make the DOS port work first. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-06 13:26 ` Po Lu @ 2021-12-06 13:41 ` Po Lu 2021-12-06 14:05 ` Eli Zaretskii 2021-12-06 13:55 ` Eli Zaretskii 1 sibling, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-06 13:41 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Po Lu <luangruo@yahoo.com> writes: > I will try to find out, but the priority for me is to make the DOS port > work first. Thanks. I disabled a few gnulib modules that were recently added and aren't required anymore, but here's a new problem: make.exe[1]: *** No rule to make target '@IEEE754_H@', needed by 'fingerprint.o'. make.exe[1]: *** No rule to make target '@GMP_H@', needed by 'fingerprint.o'. make.exe[1]: Entering directory 'c:/djgpp/src/emacs-28.0.90/lib' make.exe[1]: Leaving directory 'c:/djgpp/src/emacs-28.0.90/lib' I assume this is related to the addition of mini-gmp, and that mini-gmp has to be turned on somehow. But I don't know what that "how" is. Perhaps you could help? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-06 13:41 ` Po Lu @ 2021-12-06 14:05 ` Eli Zaretskii 2021-12-07 0:42 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-06 14:05 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Mon, 06 Dec 2021 21:41:14 +0800 > > Po Lu <luangruo@yahoo.com> writes: > > > I will try to find out, but the priority for me is to make the DOS port > > work first. > > Thanks. I disabled a few gnulib modules that were recently added and > aren't required anymore, but here's a new problem: > > make.exe[1]: *** No rule to make target '@IEEE754_H@', needed by 'fingerprint.o'. > make.exe[1]: *** No rule to make target '@GMP_H@', needed by 'fingerprint.o'. > make.exe[1]: Entering directory 'c:/djgpp/src/emacs-28.0.90/lib' > make.exe[1]: Leaving directory 'c:/djgpp/src/emacs-28.0.90/lib' > > I assume this is related to the addition of mini-gmp, and that mini-gmp > has to be turned on somehow. But I don't know what that "how" is. > > Perhaps you could help? Thanks. Do you want to build with GMP or with mini-gmp? DJGPP does have GMP, you can find it in current/v2gnu/. Or you could use the Gnulib mini-gmp. Then you need to mimic what the configure script does, depending on whether GMP or mini-gmp will be used. See m4/libgmp.m4. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-06 14:05 ` Eli Zaretskii @ 2021-12-07 0:42 ` Po Lu 2021-12-07 2:16 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-07 0:42 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > Do you want to build with GMP or with mini-gmp? DJGPP does have GMP, > you can find it in current/v2gnu/. Or you could use the Gnulib > mini-gmp. mini-gmp for now, but I will try to enable gmp support later. > Then you need to mimic what the configure script does, depending on > whether GMP or mini-gmp will be used. See m4/libgmp.m4. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-07 0:42 ` Po Lu @ 2021-12-07 2:16 ` Po Lu 2021-12-07 13:40 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-07 2:16 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Po Lu <luangruo@yahoo.com> writes: > Eli Zaretskii <eliz@gnu.org> writes: > >> Do you want to build with GMP or with mini-gmp? DJGPP does have GMP, >> you can find it in current/v2gnu/. Or you could use the Gnulib >> mini-gmp. > > mini-gmp for now, but I will try to enable gmp support later. > >> Then you need to mimic what the configure script does, depending on >> whether GMP or mini-gmp will be used. See m4/libgmp.m4. > > Thanks. It turns out that that's not the entirety of the problem: gnulib seems to define a lot of GL_GNULIB_FOO variables, which the sed scripts don't handle, but are used in each generated header. What is the purpose of those variables, and what would be a suitable value to define them to? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-07 2:16 ` Po Lu @ 2021-12-07 13:40 ` Eli Zaretskii 2021-12-08 1:02 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-07 13:40 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Tue, 07 Dec 2021 10:16:06 +0800 > > It turns out that that's not the entirety of the problem: gnulib seems > to define a lot of GL_GNULIB_FOO variables, which the sed scripts don't > handle, but are used in each generated header. > > What is the purpose of those variables, and what would be a suitable > value to define them to? They are used to produce #ifdef's and other preprocessor directives as appropriate for the target platform, see how these are used in Sed commands in gnulib.mk.in. Gnulib changed their style some since the last time those Sed scripts where tested. Where previously they had something like -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ they now use -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \ So it means that sedlibmk.inp should be amended to use GL_GNULIB_foo where previously it used GNULIB_foo. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-07 13:40 ` Eli Zaretskii @ 2021-12-08 1:02 ` Po Lu 2021-12-08 12:37 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-08 1:02 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > They are used to produce #ifdef's and other preprocessor directives as > appropriate for the target platform, see how these are used in Sed > commands in gnulib.mk.in. > > Gnulib changed their style some since the last time those Sed scripts > where tested. Where previously they had something like > > -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ > > they now use > > -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \ > > So it means that sedlibmk.inp should be amended to use GL_GNULIB_foo > where previously it used GNULIB_foo. Thanks, this gets a little further now. However, it seems to be that etags depends on gnulib regex now, and upon enabling that module it complains about "langinfo.h" missing, which I assume isn't in DJGPP. I can't find any code to generate it in gnulib either. So I'm confused: what did etags use in Emacs 26, when the MS-DOS build still certainly worked? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-08 1:02 ` Po Lu @ 2021-12-08 12:37 ` Eli Zaretskii 2021-12-08 13:26 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-08 12:37 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Wed, 08 Dec 2021 09:02:26 +0800 > > However, it seems to be that etags depends on gnulib regex now, and upon > enabling that module it complains about "langinfo.h" missing, which I > assume isn't in DJGPP. > > I can't find any code to generate it in gnulib either. The easiest way of fixing this with minimal fuss is to add to the msdos/ directory a hand-made langinfo.h, with a cop-out definition of nl_langinfo: #define nl_langinfo(ignore) "cp437" Gnulib's regexp only uses this to detect when UTF-8 is supported, and DJGPP doesn't support that as the locale's codeset. > So I'm confused: what did etags use in Emacs 26, when the MS-DOS build > still certainly worked? It used the Emacs's own regexp code, the one that is nowadays called regex-emacs.c. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-08 12:37 ` Eli Zaretskii @ 2021-12-08 13:26 ` Po Lu 2021-12-08 13:36 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-08 13:26 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > The easiest way of fixing this with minimal fuss is to add to the > msdos/ directory a hand-made langinfo.h, with a cop-out definition of > nl_langinfo: > > #define nl_langinfo(ignore) "cp437" > > Gnulib's regexp only uses this to detect when UTF-8 is supported, and > DJGPP doesn't support that as the locale's codeset. > > It used the Emacs's own regexp code, the one that is nowadays called > regex-emacs.c. Thanks, one last question: is there something about the way gnulib regex has to be compiled? It seems that regcomp.c and regex_internal.c both need types defined in regex.h, but don't include that header. Since this works on other platforms, I must be missing something here. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-08 13:26 ` Po Lu @ 2021-12-08 13:36 ` Eli Zaretskii 2021-12-09 2:10 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-08 13:36 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Wed, 08 Dec 2021 21:26:49 +0800 > > Thanks, one last question: is there something about the way gnulib regex > has to be compiled? It seems that regcomp.c and regex_internal.c both > need types defined in regex.h, but don't include that header. We only compile regex.c, which includes all those other files, and in the right order. In any built tree, look what regex*.o files you have in lib/, and you will see it. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-08 13:36 ` Eli Zaretskii @ 2021-12-09 2:10 ` Po Lu 2021-12-09 9:16 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 2:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Po Lu <luangruo@yahoo.com> >> Cc: emacs-devel@gnu.org >> Date: Wed, 08 Dec 2021 21:26:49 +0800 >> >> Thanks, one last question: is there something about the way gnulib regex >> has to be compiled? It seems that regcomp.c and regex_internal.c both >> need types defined in regex.h, but don't include that header. > > We only compile regex.c, which includes all those other files, and in > the right order. In any built tree, look what regex*.o files you have > in lib/, and you will see it. Thanks. I've gotten much further into the build process, but there are a few errors preventing emacs.exe from linking correctly: sysdep.c:2321: undefined reference to `_openat' ld: sysdep.o: in function `_emacs_open_noquit': sysdep.c:2349: undefined reference to `_openat' ld: sysdep.o: in function `_safe_strsignal': sysdep.c:2639: undefined reference to `_sigdescr_np' ld: fileio.o: in function `_Fcopy_file': fileio.c:2298: undefined reference to `_copy_file_range' ld: fileio.c:2390: undefined reference to `_futimens' ld: fileio.o: in function `_Fset_file_modes': fileio.c:3526: undefined reference to `_fchmodat' ld: fileio.o: in function `_Fset_file_times': fileio.c:3595: undefined reference to `_utimensat' ld: callproc.o: in function `_emacs_spawn': callproc.c:1612: undefined reference to `_unblock_child_signal' ld: callproc.c:1615: undefined reference to `_child_setup_tty' I would like to reimplement `openat' and `copy_file_range', and to stub the rest, but before I proceed I'd like to ask if there's already an implementation of openat and copy_file_range somewhere in DJGPP (or gnulib) that I overlooked. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 2:10 ` Po Lu @ 2021-12-09 9:16 ` Eli Zaretskii 2021-12-09 10:31 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 9:16 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Thu, 09 Dec 2021 10:10:29 +0800 > > sysdep.c:2321: undefined reference to `_openat' > ld: sysdep.o: in function `_emacs_open_noquit': > sysdep.c:2349: undefined reference to `_openat' > ld: sysdep.o: in function `_safe_strsignal': > sysdep.c:2639: undefined reference to `_sigdescr_np' > ld: fileio.o: in function `_Fcopy_file': > fileio.c:2298: undefined reference to `_copy_file_range' > ld: fileio.c:2390: undefined reference to `_futimens' > ld: fileio.o: in function `_Fset_file_modes': > fileio.c:3526: undefined reference to `_fchmodat' > ld: fileio.o: in function `_Fset_file_times': > fileio.c:3595: undefined reference to `_utimensat' > ld: callproc.o: in function `_emacs_spawn': > callproc.c:1612: undefined reference to `_unblock_child_signal' > ld: callproc.c:1615: undefined reference to `_child_setup_tty' > > I would like to reimplement `openat' and `copy_file_range', and to stub > the rest, but before I proceed I'd like to ask if there's already an > implementation of openat and copy_file_range somewhere in DJGPP (or > gnulib) that I overlooked. There's at-func.c in lib/, which implements the *at functions. But msdos.c was emulating them on its own, see readlinkat, faccessat, and other similar functions there. Their code is quite boilerplate, so it shouldn't be hard to add a couple more of them. You can use the code in w32.c as inspiration (but without the conversion of file names from UTF-8). That should take care of openat and fchmodat. I wouldn't recommend implementing copy_file_range, unless you mean the trivial implementation that returns an error indication, like the Gnulib version does. As for the rest, my recommendation is to implement futimens based on DJGPP's setftime. unblock_child_signal and child_setup_type should be #ifdef'ed away for MSDOS. As for sigdescr_np, try to compile Gnulib's sigdescr_np.c, and if that doesn't work, it should be easy to write an emulation using sys_siglist, which DJGPP does have. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 9:16 ` Eli Zaretskii @ 2021-12-09 10:31 ` Po Lu 2021-12-09 10:41 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 10:31 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > There's at-func.c in lib/, which implements the *at functions. But > msdos.c was emulating them on its own, see readlinkat, faccessat, and > other similar functions there. Their code is quite boilerplate, so it > shouldn't be hard to add a couple more of them. You can use the code > in w32.c as inspiration (but without the conversion of file names from > UTF-8). That should take care of openat and fchmodat. > I wouldn't recommend implementing copy_file_range, unless you mean the > trivial implementation that returns an error indication, like the > Gnulib version does. Thanks, I made the part in fileio.c that makes use of it conditional on !MSDOS, so on MS-DOS it will fall back to using read/write instead, > As for the rest, my recommendation is to implement futimens based on > DJGPP's setftime. Thanks, but I'm confused with the DJGPP `struct ftime': do I have to take leap years and the different lengths of each month into account when setting the various members of a `struct ftime' from a time_t? The comment here makes that uncertain: struct ftime { unsigned ft_tsec:5; /* 0-29, double to get real seconds */ unsigned ft_min:6; /* 0-59 */ unsigned ft_hour:5; /* 0-23 */ unsigned ft_day:5; /* 1-31 */ ^^ unsigned ft_month:4; /* 1-12 */ unsigned ft_year:7; /* since 1980 */ } Alternatively, is there some function I overlooked that populates `struct ftime' from time_t? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 10:31 ` Po Lu @ 2021-12-09 10:41 ` Eli Zaretskii 2021-12-09 11:00 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 10:41 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Thu, 09 Dec 2021 18:31:19 +0800 > > > As for the rest, my recommendation is to implement futimens based on > > DJGPP's setftime. > > Thanks, but I'm confused with the DJGPP `struct ftime': do I have to > take leap years and the different lengths of each month into account > when setting the various members of a `struct ftime' from a time_t? No, you don't. You just populate these fields from the time value. > Alternatively, is there some function I overlooked that populates > `struct ftime' from time_t? Not directly, but you could use localtime to obtain a 'struct tm', then populate 'struct ftime' from that, with the necessary adjustments. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 10:41 ` Eli Zaretskii @ 2021-12-09 11:00 ` Po Lu 2021-12-09 12:16 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 11:00 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Po Lu <luangruo@yahoo.com> >> Cc: emacs-devel@gnu.org >> Date: Thu, 09 Dec 2021 18:31:19 +0800 >> >> > As for the rest, my recommendation is to implement futimens based on >> > DJGPP's setftime. >> >> Thanks, but I'm confused with the DJGPP `struct ftime': do I have to >> take leap years and the different lengths of each month into account >> when setting the various members of a `struct ftime' from a time_t? > > No, you don't. You just populate these fields from the time value. > >> Alternatively, is there some function I overlooked that populates >> `struct ftime' from time_t? > > Not directly, but you could use localtime to obtain a 'struct tm', > then populate 'struct ftime' from that, with the necessary > adjustments. After implementing the missing functions, the linker complained about duplicate copies of mktime, one in libc.a, and the other in gnulib's mktime module, but I can't disable the mktime module, because the timegm module doesn't work without mktime_internal, which is only defined in mktime.c. There is a mechanism for only building `mktime_internal' by only defining `NEED_MKTIME_INTERNAL', but I don't know how to use it inside gnulib.mk. Or is some file supposed to include both timegm.c and mktime.c, or something to that effect? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 11:00 ` Po Lu @ 2021-12-09 12:16 ` Eli Zaretskii 2021-12-09 12:42 ` Po Lu 2021-12-09 12:43 ` Eli Zaretskii 0 siblings, 2 replies; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 12:16 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Thu, 09 Dec 2021 19:00:12 +0800 > > After implementing the missing functions, the linker complained about > duplicate copies of mktime, one in libc.a, and the other in gnulib's > mktime module If we have mktime from Gnulib, then why does linker pull mktime from libc.a as well? It's supposed to be satisfied by the first function by that name that it sees in any library it links in. Can you add -Wl,-t -Wl,-t (yes, the same option twice) to the link command line, and see what libraries are involved in this and why? > Or is some file supposed to include both timegm.c and mktime.c, or > something to that effect? Not sure I understand what does timegm have to do with this. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 12:16 ` Eli Zaretskii @ 2021-12-09 12:42 ` Po Lu 2021-12-09 12:43 ` Eli Zaretskii 1 sibling, 0 replies; 65+ messages in thread From: Po Lu @ 2021-12-09 12:42 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: Po Lu <luangruo@yahoo.com> >> Cc: emacs-devel@gnu.org >> Date: Thu, 09 Dec 2021 19:00:12 +0800 >> >> After implementing the missing functions, the linker complained about >> duplicate copies of mktime, one in libc.a, and the other in gnulib's >> mktime module > > If we have mktime from Gnulib, then why does linker pull mktime from > libc.a as well? It's supposed to be satisfied by the first function > by that name that it sees in any library it links in. > > Can you add -Wl,-t -Wl,-t (yes, the same option twice) to the link > command line, and see what libraries are involved in this and why? ld: c:/djgpp/lib/libc.a(ctime.o):ctime.c:(.text+0x27c0): multiple definition of `_mktime'; ../lib/libgnu.a(mktime.o):c:/djgpp/src/emacs-28.0.90/lib/mktime.c:525: first defined here This is the error, which is odd because it first considers mktime.o in libgnu.a, and only ctime.o in libc.a much later, which is evident from the output of ld: ../lib/libgnu.a [...] (../lib/libgnu.a)mktime.o [...] c:/djgpp/lib/libc.a [...] (c:/djgpp/lib/libc.a)ctime.o ld: c:/djgpp/lib/libc.a(ctime.o):ctime.c:(.text+0x27c0): multiple definition of `_mktime'; ../lib/libgnu.a(mktime.o):c:/djgpp/src/emacs-28.0.90/lib/mktime.c:525: first defined here ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 12:16 ` Eli Zaretskii 2021-12-09 12:42 ` Po Lu @ 2021-12-09 12:43 ` Eli Zaretskii 2021-12-09 12:49 ` Po Lu 1 sibling, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 12:43 UTC (permalink / raw) To: luangruo; +Cc: emacs-devel > Date: Thu, 09 Dec 2021 14:16:16 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: emacs-devel@gnu.org > > > After implementing the missing functions, the linker complained about > > duplicate copies of mktime, one in libc.a, and the other in gnulib's > > mktime module > > If we have mktime from Gnulib, then why does linker pull mktime from > libc.a as well? It's supposed to be satisfied by the first function > by that name that it sees in any library it links in. I think I know the answer: it's because we use localtime, which DJGPP defines on the same source file as mktime. I see that in the Emacs 26.2 build, the function mktime in Gnulib's mktime.c module was renamed to rpl_mktime, which is how the duplicate definition problem was resolved. The current Gnulib's mktime.c module still allows that (search mktime.c for "rpl"), so all you need to do is arrange for the relevant cpp macro to be defined. This is supposed to be done by sed2v2.inp, so I guess it is somehow not working now? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 12:43 ` Eli Zaretskii @ 2021-12-09 12:49 ` Po Lu 2021-12-09 12:56 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 12:49 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> Date: Thu, 09 Dec 2021 14:16:16 +0200 >> From: Eli Zaretskii <eliz@gnu.org> >> Cc: emacs-devel@gnu.org >> >> > After implementing the missing functions, the linker complained about >> > duplicate copies of mktime, one in libc.a, and the other in gnulib's >> > mktime module >> >> If we have mktime from Gnulib, then why does linker pull mktime from >> libc.a as well? It's supposed to be satisfied by the first function >> by that name that it sees in any library it links in. > > I think I know the answer: it's because we use localtime, which DJGPP > defines on the same source file as mktime. > > I see that in the Emacs 26.2 build, the function mktime in Gnulib's > mktime.c module was renamed to rpl_mktime, which is how the duplicate > definition problem was resolved. The current Gnulib's mktime.c module > still allows that (search mktime.c for "rpl"), so all you need to do > is arrange for the relevant cpp macro to be defined. This is supposed > to be done by sed2v2.inp, so I guess it is somehow not working now? It seems that `REPLACE_MKTIME' is 0 in gnulib.mk. I see the issue now, thanks! ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 12:49 ` Po Lu @ 2021-12-09 12:56 ` Po Lu 2021-12-09 13:08 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 12:56 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Po Lu <luangruo@yahoo.com> writes: > Eli Zaretskii <eliz@gnu.org> writes: > >>> Date: Thu, 09 Dec 2021 14:16:16 +0200 >>> From: Eli Zaretskii <eliz@gnu.org> >>> Cc: emacs-devel@gnu.org >>> >>> > After implementing the missing functions, the linker complained about >>> > duplicate copies of mktime, one in libc.a, and the other in gnulib's >>> > mktime module >>> >>> If we have mktime from Gnulib, then why does linker pull mktime from >>> libc.a as well? It's supposed to be satisfied by the first function >>> by that name that it sees in any library it links in. >> >> I think I know the answer: it's because we use localtime, which DJGPP >> defines on the same source file as mktime. >> >> I see that in the Emacs 26.2 build, the function mktime in Gnulib's >> mktime.c module was renamed to rpl_mktime, which is how the duplicate >> definition problem was resolved. The current Gnulib's mktime.c module >> still allows that (search mktime.c for "rpl"), so all you need to do >> is arrange for the relevant cpp macro to be defined. This is supposed >> to be done by sed2v2.inp, so I guess it is somehow not working now? > > It seems that `REPLACE_MKTIME' is 0 in gnulib.mk. I see the issue now, > thanks! Now I'm really lost: temacs.exe is 14.1 MB, but trying to run it from the Makefile or like this: C:\DJGPP\src\emacs-28.0.90\src> temacs Results in "This program is too large to fit in memory." Any ideas? Maybe I should fiddle with compiler and linker versions? Or perhaps there is some attribute that must be set for this to work on MS-DOS? Thanks in advance! ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 12:56 ` Po Lu @ 2021-12-09 13:08 ` Eli Zaretskii 2021-12-09 13:18 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 13:08 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Thu, 09 Dec 2021 20:56:28 +0800 > > Now I'm really lost: temacs.exe is 14.1 MB, but trying to run it from > the Makefile or like this: > > C:\DJGPP\src\emacs-28.0.90\src> temacs > > Results in "This program is too large to fit in memory." Is this on Windows XP or on plain DOS? What does go32-v2.exe say if invoked with no arguments? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 13:08 ` Eli Zaretskii @ 2021-12-09 13:18 ` Po Lu 2021-12-09 13:40 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 13:18 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> Results in "This program is too large to fit in memory." > Is this on Windows XP or on plain DOS? This is Windows XP. > What does go32-v2.exe say if invoked with no arguments? It prints the following text: go32/v2 version 2.0 built Oct 18 2015 09:41:08 Usage: go32 coff-image [args] Rename this to go32.exe only if you need a go32 that can run v2 binaries as well as v1 binaries (old makefiles). Put ahead of the old go32 in your PATH but do not delete your old go32 - leave it in the PATH after this one. Set GO32_V2_DEBUG=y in the environment to get verbose output. DPMI memory available: 664200 Kb DPMI swap space available: 0 Kb ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 13:18 ` Po Lu @ 2021-12-09 13:40 ` Eli Zaretskii 2021-12-09 13:42 ` Eli Zaretskii 2021-12-09 13:47 ` Po Lu 0 siblings, 2 replies; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 13:40 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Thu, 09 Dec 2021 21:18:22 +0800 > > Eli Zaretskii <eliz@gnu.org> writes: > > >> Results in "This program is too large to fit in memory." > > > Is this on Windows XP or on plain DOS? > > This is Windows XP. > > > What does go32-v2.exe say if invoked with no arguments? > > It prints the following text: > > go32/v2 version 2.0 built Oct 18 2015 09:41:08 > Usage: go32 coff-image [args] > Rename this to go32.exe only if you need a go32 that can run v2 binaries as > well as v1 binaries (old makefiles). Put ahead of the old go32 in your PATH > but do not delete your old go32 - leave it in the PATH after this one. > Set GO32_V2_DEBUG=y in the environment to get verbose output. > > DPMI memory available: 664200 Kb > DPMI swap space available: 0 Kb That's 660MB. A bit low (I get 1.5GB here), but should be enough to start. How do you run Windows XP? is that natively, or do you run it in some VM on GNU/Linux? If the latter, does that VM have any settings regarding DPMI and/or memory? Also, does the below also fail? C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal C:\DJGPP\src\emacs-28.0.90\src> temacs -Q And what's the layout of the Command Prompt window from which you invoke temacs? how many lines by how many columns? And finally, did you try to close the Command Prompt (thus killing NTVDM), and then starting temacs from a fresh Command Prompt window? IME, many failed attempts to build MS-DOS Emacs sometimes cause NTVDM to be in some strange state, where stuff fails for no good reason, and restarting NTVDM makes those problems go away. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 13:40 ` Eli Zaretskii @ 2021-12-09 13:42 ` Eli Zaretskii 2021-12-09 13:50 ` Po Lu 2021-12-09 13:47 ` Po Lu 1 sibling, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 13:42 UTC (permalink / raw) To: luangruo; +Cc: emacs-devel > Date: Thu, 09 Dec 2021 15:40:04 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: emacs-devel@gnu.org > > How do you run Windows XP? is that natively, or do you run it in some > VM on GNU/Linux? If the latter, does that VM have any settings > regarding DPMI and/or memory? > > Also, does the below also fail? > > C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal > C:\DJGPP\src\emacs-28.0.90\src> temacs -Q > > And what's the layout of the Command Prompt window from which you > invoke temacs? how many lines by how many columns? > > And finally, did you try to close the Command Prompt (thus killing > NTVDM), and then starting temacs from a fresh Command Prompt window? > IME, many failed attempts to build MS-DOS Emacs sometimes cause NTVDM > to be in some strange state, where stuff fails for no good reason, and > restarting NTVDM makes those problems go away. And if these questions are not enough, here's one more: you have built the unexec version of Emacs, not the pdumper version, right? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 13:42 ` Eli Zaretskii @ 2021-12-09 13:50 ` Po Lu 0 siblings, 0 replies; 65+ messages in thread From: Po Lu @ 2021-12-09 13:50 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> Date: Thu, 09 Dec 2021 15:40:04 +0200 >> From: Eli Zaretskii <eliz@gnu.org> >> Cc: emacs-devel@gnu.org >> >> How do you run Windows XP? is that natively, or do you run it in some >> VM on GNU/Linux? If the latter, does that VM have any settings >> regarding DPMI and/or memory? >> >> Also, does the below also fail? >> >> C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal >> C:\DJGPP\src\emacs-28.0.90\src> temacs -Q >> >> And what's the layout of the Command Prompt window from which you >> invoke temacs? how many lines by how many columns? >> >> And finally, did you try to close the Command Prompt (thus killing >> NTVDM), and then starting temacs from a fresh Command Prompt window? >> IME, many failed attempts to build MS-DOS Emacs sometimes cause NTVDM >> to be in some strange state, where stuff fails for no good reason, and >> restarting NTVDM makes those problems go away. > And if these questions are not enough, here's one more: you have built > the unexec version of Emacs, not the pdumper version, right? Yes, HAVE_UNEXEC is defined in config.h: I added the line /^#undef HAVE_UNEXEC *$/s/^.*$/#define HAVE_UNEXEC 1/ to sed2v2.inp to make it work. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 13:40 ` Eli Zaretskii 2021-12-09 13:42 ` Eli Zaretskii @ 2021-12-09 13:47 ` Po Lu 2021-12-09 14:07 ` Eli Zaretskii 1 sibling, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-09 13:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > That's 660MB. A bit low (I get 1.5GB here), but should be enough to > start. > How do you run Windows XP? is that natively, or do you run it in some > VM on GNU/Linux? It's run natively, on an old machine I have lying around. > Also, does the below also fail? > > C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal > C:\DJGPP\src\emacs-28.0.90\src> temacs -Q Yes, it does. > And what's the layout of the Command Prompt window from which you > invoke temacs? how many lines by how many columns? It's 80 characters wide and 25 characters tall. > And finally, did you try to close the Command Prompt (thus killing > NTVDM), and then starting temacs from a fresh Command Prompt window? > IME, many failed attempts to build MS-DOS Emacs sometimes cause NTVDM > to be in some strange state, where stuff fails for no good reason, and > restarting NTVDM makes those problems go away. I just tried that, and I still get the same error. I forgot to mention that the computer runs a version of MS-Windows localized to Chinese, and perhaps that could be related? Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 13:47 ` Po Lu @ 2021-12-09 14:07 ` Eli Zaretskii 2021-12-09 14:24 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 14:07 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Thu, 09 Dec 2021 21:47:04 +0800 > > I forgot to mention that the computer runs a version of MS-Windows > localized to Chinese, and perhaps that could be related? Could be, I don't remember when DJGPP in general and Emacs in particular were last run in CJK locales. If you download Emacs 26.2 from the DJGPP site and run it on that XP box, does it start normally? Can you build Emacs 26.2 from the source tarball, and then run temacs you have built that way? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 14:07 ` Eli Zaretskii @ 2021-12-09 14:24 ` Eli Zaretskii 2021-12-09 14:33 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 14:24 UTC (permalink / raw) To: luangruo; +Cc: emacs-devel > Date: Thu, 09 Dec 2021 16:07:53 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: emacs-devel@gnu.org > > If you download Emacs 26.2 from the DJGPP site and run it on that XP > box, does it start normally? Can you build Emacs 26.2 from the source > tarball, and then run temacs you have built that way? Also, what does this display: C:\DJGPP\src\emacs-28.0.90\src> objdump -h temacs.exe ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 14:24 ` Eli Zaretskii @ 2021-12-09 14:33 ` Eli Zaretskii 2021-12-09 14:44 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 14:33 UTC (permalink / raw) To: luangruo; +Cc: emacs-devel > Date: Thu, 09 Dec 2021 16:24:02 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: emacs-devel@gnu.org > > Also, what does this display: > > C:\DJGPP\src\emacs-28.0.90\src> objdump -h temacs.exe And two more things to try: C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal C:\DJGPP\src\emacs-28.0.90\src> go32-v2 ./temacs -Q (note: "temacs", not "temacs.exe" -- it should be a separate file, and slightly smaller than temacs.exe). And what does the below display? C:\DJGPP\src\emacs-28.0.90\src> mem ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 14:33 ` Eli Zaretskii @ 2021-12-09 14:44 ` Eli Zaretskii 2021-12-10 0:23 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-09 14:44 UTC (permalink / raw) To: luangruo; +Cc: emacs-devel > Date: Thu, 09 Dec 2021 16:33:27 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: emacs-devel@gnu.org > > C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal > C:\DJGPP\src\emacs-28.0.90\src> go32-v2 ./temacs -Q > > (note: "temacs", not "temacs.exe" -- it should be a separate file, and > slightly smaller than temacs.exe). > > And what does the below display? > > C:\DJGPP\src\emacs-28.0.90\src> mem And another question: what is the contents of C:\WINDOWS\system32\CONFIG.NT and C:\WINDOWS\system32\AUTOEXEC.NT on that XP box? ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-09 14:44 ` Eli Zaretskii @ 2021-12-10 0:23 ` Po Lu 2021-12-10 0:44 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-10 0:23 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> Date: Thu, 09 Dec 2021 16:33:27 +0200 >> From: Eli Zaretskii <eliz@gnu.org> >> Cc: emacs-devel@gnu.org >> >> C:\DJGPP\src\emacs-28.0.90\src> set TERM=internal >> C:\DJGPP\src\emacs-28.0.90\src> go32-v2 ./temacs -Q >> >> (note: "temacs", not "temacs.exe" -- it should be a separate file, and >> slightly smaller than temacs.exe). >> >> And what does the below display? >> >> C:\DJGPP\src\emacs-28.0.90\src> mem > > And another question: what is the contents of > C:\WINDOWS\system32\CONFIG.NT and C:\WINDOWS\system32\AUTOEXEC.NT on > that XP box? Apologies for wasting your time, I found the problem to be an anti-virus program installed on that box, and temacs started to work after removing the anti-virus. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-10 0:23 ` Po Lu @ 2021-12-10 0:44 ` Po Lu 2021-12-10 8:36 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-10 0:44 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Po Lu <luangruo@yahoo.com> writes: > Apologies for wasting your time, I found the problem to be an anti-virus > program installed on that box, and temacs started to work after removing > the anti-virus. BTW, the line numbers are wrong when debugging the produced temacs.exe binary with gdb 7.2. I wonder if this is a known problem. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-10 0:44 ` Po Lu @ 2021-12-10 8:36 ` Eli Zaretskii 2021-12-10 9:35 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-10 8:36 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Fri, 10 Dec 2021 08:44:19 +0800 > > BTW, the line numbers are wrong when debugging the produced temacs.exe > binary with gdb 7.2. I wonder if this is a known problem. Is it an optimized build? If so, it's expected. In general, debugging -gcoff code is fragile, as both GCC, Binutils, and GDB stopped actively using that debug info long ago. So yes, debugging is somewhat a challenge, and expect to have to use stepi frequently because just step won't work, for example. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-10 8:36 ` Eli Zaretskii @ 2021-12-10 9:35 ` Po Lu 2021-12-10 13:44 ` Po Lu via Emacs development discussions. 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-10 9:35 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > Is it an optimized build? If so, it's expected. Thanks! ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-10 9:35 ` Po Lu @ 2021-12-10 13:44 ` Po Lu via Emacs development discussions. 2021-12-10 14:26 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu via Emacs development discussions. @ 2021-12-10 13:44 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 556 bytes --] Po Lu <luangruo@yahoo.com> writes: > Eli Zaretskii <eliz@gnu.org> writes: > >> Is it an optimized build? If so, it's expected. > > Thanks! I got the MS-DOS port to work. Everything seems to run normally, but someone might need to run it under a DOS machine (as opposed to the NTVDM) to be sure. If you have no further comments (and it doesn't break the build on non-DOS platforms), I would like to install the following change on the Emacs 28 branch (and hopefully get it to work on master as well: the DOS port will probably not work there either): [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Fix-the-DJGPP-port.patch --] [-- Type: text/x-patch, Size: 22581 bytes --] From a16c29282e93b2bf4fb3975f32f0cbf590ff3568 Mon Sep 17 00:00:00 2001 From: Po Lu <luangruo@yahoo.com> Date: Fri, 10 Dec 2021 21:36:59 +0800 Subject: [PATCH] Fix the DJGPP port * config.bat: * msdos/sed1v2.inp: * msdos/sed2v2.inp: * msdos/sed3v2.inp: * msdos/sedlibmk.inp: Update for Emacs 28. * msdos/langinfo.h: New file. * lisp/loadup.el: Use correct path to temacs when dumping on MS-DOS. * src/Makefile.in (temacs$(EXEEXT)): Add separate rule for MS-DOS. * src/callproc.c (environ) [MSDOS]: New declaration. (child_setup, emacs_spawn): Update MS-DOS parts for Emacs 28. * src/fileio.c (Fcopy_file): Don't use copy_file_range on MS-DOS. * src/msdos.c (initialize_msdos_display): Add `defined_color_hook'. (openat, fchmodat, futimens, utimensat): New functions. * src/msdos.h (FRAME_X_DISPLAY): New macro. * src/process.c: Make some more things conditional on subprocess support. (PIPECONN_P, PIPECONN1_P) [!subprocesses]: New placeholder macros. (Fnum_processors): Return 1 on MSDOS. (open_channel_for_module): Avoid subprocess specific code on MSDOS. --- config.bat | 7 +++++- lisp/loadup.el | 4 ++- msdos/langinfo.h | 20 +++++++++++++++ msdos/sed1v2.inp | 22 ++++++++++++++++ msdos/sed2v2.inp | 1 + msdos/sed3v2.inp | 1 + msdos/sedlibmk.inp | 63 ++++++++++++++++++++++++++++------------------ src/Makefile.in | 9 +++++++ src/callproc.c | 27 ++++++++++++++++++++ src/fileio.c | 2 ++ src/msdos.c | 53 ++++++++++++++++++++++++++++++++++++++ src/msdos.h | 2 ++ src/process.c | 17 ++++++++++--- src/thread.c | 1 + src/thread.h | 1 + 15 files changed, 201 insertions(+), 29 deletions(-) create mode 100644 msdos/langinfo.h diff --git a/config.bat b/config.bat index cba7336099..e4332cd326 100644 --- a/config.bat +++ b/config.bat @@ -283,6 +283,7 @@ If Exist execinfo.in.h update execinfo.in.h execinfo.in-h If Exist fcntl.in.h update fcntl.in.h fcntl.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h If Exist getopt-cdefs.in.h update getopt-cdefs.in.h getopt-cdefs.in-h +If Exist ieee754.in.h update ieee754.in.h ieee754.in-h If Exist inttypes.in.h update inttypes.in.h inttypes.in-h If Exist limits.in.h update limits.in.h limits.in-h If Exist signal.in.h update signal.in.h signal.in-h @@ -293,6 +294,7 @@ If Exist stdint.in.h update stdint.in.h stdint.in-h If Exist stdio.in.h update stdio.in.h stdio.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h If Exist string.in.h update string.in.h string.in-h +If Exist sys_random.in.h update sys_random.in.h sys_random.in-h If Exist sys_select.in.h update sys_select.in.h sys_select.in-h If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist sys_time.in.h update sys_time.in.h sys_time.in-h @@ -308,10 +310,13 @@ rm -f makefile.tmp sed -f ../msdos/sedlibcf.inp < gnulib.mk-in > gnulib.tmp sed -f ../msdos/sedlibmk.inp < gnulib.tmp > gnulib.mk rm -f gnulib.tmp -Rem Create .d files for new files in lib/ +Rem Create .d files for new files in lib/ and lib/malloc/ If Not Exist deps\stamp mkdir deps for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f echo deps-stamp > deps\stamp +If Not Exist deps\malloc\stamp mkdir deps\malloc +for %%f in (malloc\*.c) do @call ..\msdos\depfiles.bat %%f +echo deps-stamp > deps\malloc\stamp cd .. rem ---------------------------------------------------------------------- Echo Configuring the lisp directory... diff --git a/lisp/loadup.el b/lisp/loadup.el index e8ecb67d56..4da0ff7385 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -549,7 +549,9 @@ (lexical-binding nil)) (if (member tmp-dump-mode '("pdump" "pbootstrap")) (dump-emacs-portable (expand-file-name output invocation-directory)) - (dump-emacs output "temacs") + (dump-emacs output (if (eq system-type 'ms-dos) + "temacs.exe" + "temacs")) (message "%d pure bytes used" pure-bytes-used)) (setq success t)) (unless success diff --git a/msdos/langinfo.h b/msdos/langinfo.h new file mode 100644 index 0000000000..a74c3f7f8e --- /dev/null +++ b/msdos/langinfo.h @@ -0,0 +1,20 @@ +/* Replacement langinfo.h file for building GNU Emacs on MS-DOS with DJGPP. + +Copyright (C) 2021 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ + +#define nl_langinfo(ignore) "cp437" diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 5d82af66d9..809a9edf95 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -55,6 +55,10 @@ s/ *@LIBJPEG@// s/ *@LIBPNG@// s/ *@LIBGIF@// s/ *@LIBXPM@// +/^HAVE_NATIVE_COMP *=/s/@HAVE_NATIVE_COMP@// +/^HAVE_PDUMPER *=/s/@HAVE_PDUMPER@// +/^CHECK_STRUCTS *=/s/@CHECK_STRUCTS@// +/^RUN_TEMACS \=/s/temacs/temacs.exe/ /^XFT_LIBS *=/s/@XFT_LIBS@// /^XCB_LIBS *=/s/@XCB_LIBS@// /^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@// @@ -150,6 +154,22 @@ s/ *@LIBXPM@// /^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/ /^W32_OBJ *=/s/@W32_OBJ@// /^W32_LIBS *=/s/@W32_LIBS@// +/^JSON_OBJ *=/s/@JSON_OBJ@// +/^JSON_CFLAGS *=/s/@JSOB_CFLAGS@// +/^JSON_LIBS *=/s/@JSOB_LIBS@// +/^LIBGCCJIT_OBJ *=/s/@LIBGCCJIT_OBJ@// +/^LIBGCCJIT_CFLAGS *=/s/@LIBGCCJIT_CFLAGS@// +/^LIBGCCJIT_LIBS *=/s/@LIBGCCJIT_LIBS@// +/^HARFBUZZ_CFLAGS *=/s/@HARFBUZZ_CFLAGS@// +/^HARFBUZZ_LIBS *=/s/@HARFBUZZ_LIBS@// +/^LCMS2_CFLAGS *=/s/@LCMS2_CFLAGS@// +/^LCMS2_LIBS *=/s/@LCMS2_LIBS@// +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// +/^JSON_LIBS *=/s/@JSON_LIBS@// +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// +/^JSON_LIBS *=/s/@JSON_LIBS@// +/^LIBGMP *=/s/@LIBGMP@// +/^DYNLIB_OBJ *=/s/@DYNLIB_OBJ@// /^version *=/s/@[^@\n]*@// /^EMACSRES *=/s/@EMACSRES@// /^W32_RES_LINK *=/s/@W32_RES_LINK@// @@ -162,6 +182,7 @@ s/ *@LIBXPM@// /^AUTO_DEPEND *=/s/@AUTO_DEPEND@/yes/ /^PAXCTL_dumped *=/s/=.*$/=/ /^PAXCTL_notdumped *=/s/=.*$/=/ +/^DUMPING *=/s/@DUMPING@/unexec/ /^lisp\.mk:/,/^$/c\ lisp.mk: $(lispsource)/loadup.el\ @rm -f $@\ @@ -183,6 +204,7 @@ lisp.mk: $(lispsource)/loadup.el\ /^ *ifneq (\$(PAXCTL_dumped),)/,/^ *endif/d /^ *ln /s/ln /cp / /^ fi/d +/ifeq (\$(HAVE_NATIVE_COMP):\$(NATIVE_DISABLED),yes:)/,/endif/d /^ *\$(RUN_TEMACS) /i\ stubedit temacs.exe minstack=1024k /^ *LC_ALL=C \$(RUN_TEMACS)/i\ diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 5238f2dfc6..ae5d46fe86 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -37,6 +37,7 @@ /^#undef HAVE_STRUCT_UTIMBUF *$/s/^.*$/#define HAVE_STRUCT_UTIMBUF 1/ /^#undef LOCALTIME_CACHE *$/s/^.*$/#define LOCALTIME_CACHE 1/ /^#undef HAVE_TZSET *$/s/^.*$/#define HAVE_TZSET 1/ +/^#undef HAVE_UNEXEC *$/s/^.*$/#define HAVE_UNEXEC 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index 8b9bb0679b..f7c9eb05ba 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -34,6 +34,7 @@ /^LIBS_SYSTEM *=/s/@[^@\n]*@//g /^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g +/^LIB_GETRANDOM *=/s/@[^@\n]*@//g /^CFLAGS *=/s!=.*$!=-O2 -g! /^CPPFLAGS *=/s/@CPPFLAGS@// /^LDFLAGS *=/s/@LDFLAGS@// diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 825be84968..b3b94297d6 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -144,7 +144,7 @@ s/@PACKAGE@/emacs/ /^CPP *=/s/@[^@\n]*@/gcc -e/ /^CPPFLAGS *=/s/@[^@\n]*@// /^CCDEPMODE *=/s/@[^@\n]*@/depmode=gcc3/ -/^CFLAGS *=/s/@[^@\n]*@/-g -O2/ +/^CFLAGS *=/s/@[^@\n]*@/-g -O2 -I$\(srcdir\)\/..\/msdos/ /^CYGPATH_W *=/s/@[^@\n]*@// /^CYGWIN_OBJ *=/s/@[^@\n]*@// /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// @@ -170,28 +170,28 @@ s/@PACKAGE@/emacs/ /^BITSIZEOF_WCHAR_T *=/s/@BITSIZEOF_WCHAR_T@/16/ /^BITSIZEOF_WINT_T *=/s/@BITSIZEOF_WINT_T@/32/ /^APPLE_UNIVERSAL_BUILD *=/s/@APPLE_UNIVERSAL_BUILD@/0/ -# -# Most GNULIB_* are replaced with zero even though DJGPP does not have -# these features. That's because the gnulib replacements cannot +# Most GL_GNULIB_* are replaced with zero even though DJGPP does not +# have these features. That's because the gnulib replacements cannot # possibly work for DJGPP, so we prefer to fail the link than have a # subtly botched executable. Those replacements that _are_ needed # should be before the last catch-all rule. -/^GNULIB_ATOLL *=/s/@GNULIB_ATOLL@/1/ -/^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ -/^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/1/ -/^GNULIB_FDATASYNC *=/s/@GNULIB_FDATASYNC@/1/ -/^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ -/^GNULIB_GL_UNISTD_H_GETOPT *=/s/@GNULIB_GL_UNISTD_H_GETOPT@/1/ -/^GNULIB_MEMRCHR *=/s/@GNULIB_MEMRCHR@/1/ -/^GNULIB_MKOSTEMP *=/s/@GNULIB_MKOSTEMP@/1/ -/^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/1/ -/^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ -/^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/1/ -/^GNULIB_TIME_RZ *=/s/@GNULIB_TIME_RZ@/1/ -/^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ -/^GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/ -/^GSETTINGS_CFLAGS *=/s/@[^@\n]*@// -/^GSETTINGS_LIBS *=/s/@[^@\n]*@// +/^GL_GNULIB_ATOLL *=/s/@GL_GNULIB_ATOLL@/1/ +/^GL_GNULIB_DUP3 *=/s/@GL_GNULIB_DUP3@/1/ +/^GL_GNULIB_ENVIRON *=/s/@GL_GNULIB_ENVIRON@/1/ +/^GL_GNULIB_FDATASYNC *=/s/@GL_GNULIB_FDATASYNC@/1/ +/^GL_GNULIB_GETLOADAVG *=/s/@GL_GNULIB_GETLOADAVG@/1/ +/^GL_GNULIB_UNISTD_H_GETOPT *=/s/@GL_GNULIB_UNISTD_H_GETOPT@/1/ +/^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/ +/^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/ +/^GL_GNULIB_MKOSTEMP *=/s/@GL_GNULIB_MKOSTEMP@/1/ +/^GL_GNULIB_MKTIME *=/s/@GL_GNULIB_MKTIME@/1/ +/^GL_GNULIB_TIME_R *=/s/@GL_GNULIB_TIME_R@/1/ +/^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/ +/^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/ +/^GL_GNULIB_UNSETENV *=/s/@GL_GNULIB_UNSETENV@/1/ +/^GL_GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/ +/^GL_GSETTINGS_CFLAGS *=/s/@[^@\n]*@// +/^GL_GSETTINGS_LIBS *=/s/@[^@\n]*@// # # Edit the HAVE_foo variables /^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/ @@ -253,6 +253,7 @@ s/@PACKAGE@/emacs/ /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ +/^HAVE_LIBGMP *=/s/@HAVE_LIBGMP@/0/ /^HAVE__BOOL *=/s/@HAVE__BOOL@/1/ /^HAVE__EXIT *=/s/@HAVE__EXIT@/1/ /^HAVE_[^ =]* *= *@/s/@[^@\n]*@/0/ @@ -265,7 +266,9 @@ s/@PACKAGE@/emacs/ /^LIBS *=/s/@[^@\n]*@// /^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ # MKDIR_P lines are edited further below -/^MKDIR_P *=/s/@MKDIR_P@// +# MKDIR_P is only used to create lib/malloc, and the folder is +# already present in the distribution, so this should work fine. +/^MKDIR_P *=/s/@MKDIR_P@/echo/ /^NEXT_AS_FIRST_DIRECTIVE_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/ /^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/ @@ -309,6 +312,7 @@ s/@PACKAGE@/emacs/ /^REPLACE_MKTIME *=/s/@[^@\n]*@/1/ # We don't want any other gnulib replacement functions /^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/ +/^LIB_GETRANDOM[^ =]* *= *@/s/@[^@\n]*@// /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ @@ -317,18 +321,23 @@ s/@PACKAGE@/emacs/ /^ERRNO_H *=/s/@[^@\n]*@// /^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/ /^GETOPT_CDEFS_H *=/s/@[^@\n]*@/getopt-cdefs.h/ +/^GMP_H *=/s/@[^@\n]*@/gmp.h/ /^LIMITS_H *=/s/@[^@\n]*@/limits.h/ +/^IEEE754_H *=/s/@[^@\n]*@/ieee754.h/ /^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDDEF_H *=/s/@[^@\n]*@/stddef.h/ /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ /^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ +/^TIME_H_DEFINES_TIME_UTC *=/s/@[^@\n]*@/0/ +/^UNISTD_H_HAVE_SYS_RANDOM_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ /^UNISTD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/ /^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ /^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// +/^GNULIBHEADERS_OVERRIDE_WINT_T *=/s/@[^@\n]*@/0/ /^WINDOWS_64_BIT_OFF_T *=/s/@WINDOWS_64_BIT_OFF_T@/0/ /^WINDOWS_64_BIT_ST_SIZE *=/s/@WINDOWS_64_BIT_ST_SIZE@/0/ /^WINDOWS_STAT_INODES *=/s/@WINDOWS_STAT_INODES@/0/ @@ -337,7 +346,7 @@ s/@PACKAGE@/emacs/ /am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/ /am__append_2 *=.*verify\.h/s/@[^@\n]*@// /^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@// -/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o time_rz.o timegm.o mktime.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o execinfo.o/ +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o getrandom.o memrchr.o mempcpy.o regex.o memmem.o sig2str.o sigdescr_np.o time_r.o time_rz.o timegm.o mktime.o mini-gmp-gnulib.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o execinfo.o tempname.o/ /^am__append_[1-9][0-9]* *=/,/^[^ ]/{ s/ *inttypes\.h// s| *sys/select\.h|| @@ -394,15 +403,19 @@ s/^ -*test -z.*|| rm/ -rm/ s/@echo /@djecho / # # Determine which headers to generate -s/= @GL_GENERATE_ALLOCA_H@/= 1/ +s/= @GL_GENERATE_ALLOCA_H_TRUE@/= 1/ s/= @GL_GENERATE_BYTESWAP_H@/= 1/ s/= @GL_GENERATE_EXECINFO_H@/= 1/ +s/= @GL_GENERATE_IEEE754_H@/= 1/ s/= @GL_GENERATE_STDALIGN_H@/= 1/ s/= @GL_GENERATE_STDDEF_H@/= 1/ s/= @GL_GENERATE_STDINT_H@/= 1/ s/= @GL_GENERATE_LIMITS_H@/= 1/ s/= @GL_GENERATE_ERRNO_H@/= / s/= @GL_GENERATE_LIMITS_H@/= / +s/= @GL_GENERATE_GMP_GMP_H@/= 1/ +s/= @GL_GENERATE_MINI_GMP_H@/= 1/ +s/\$\(MKDIR_P\) malloc// # # Determine which modules to build and which to omit /^noinst_LIBRARIES /a\ @@ -413,6 +426,7 @@ OMIT_GNULIB_MODULE_careadlinkat = true\ OMIT_GNULIB_MODULE_cloexec = true\ OMIT_GNULIB_MODULE_dirent = true\ OMIT_GNULIB_MODULE_dirfd = true\ +OMIT_GNULIB_MODULE_scratch_buffer = true\ OMIT_GNULIB_MODULE_dup2 = true\ OMIT_GNULIB_MODULE_errno = true\ OMIT_GNULIB_MODULE_euidaccess = true\ @@ -439,7 +453,8 @@ OMIT_GNULIB_MODULE_strtoimax = true\ OMIT_GNULIB_MODULE_strtoll = true\ OMIT_GNULIB_MODULE_symlink = true\ OMIT_GNULIB_MODULE_sys_select = true\ -OMIT_GNULIB_MODULE_sys_time = true +OMIT_GNULIB_MODULE_sys_time = true\ +OMIT_GNULIB_MODULE_crypto\/md5 = true /^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\ sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@ diff --git a/src/Makefile.in b/src/Makefile.in index 954d548216..630efb75a9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -638,6 +638,14 @@ $(LIBEGNU_ARCHIVE): MAKE_PDUMPER_FINGERPRINT = endif +ifneq ($(MSDOS_OBJ),) +temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \ + $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT) + $(AM_V_CCLD)$(CC) -o $@ \ + $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ + $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) + $(MKDIR_P) $(etc) +else ## We have to create $(etc) here because init_cmdargs tests its ## existence when setting Vinstallation_directory (FIXME?). ## This goes on to affect various things, and the emacs binary fails @@ -660,6 +668,7 @@ temacs$(EXEEXT): $(PAXCTL_notdumped) $@ endif endif +endif ## The following oldxmenu-related rules are only (possibly) used if ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them. diff --git a/src/callproc.c b/src/callproc.c index fad81694b0..f7c55d0486 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -25,6 +25,10 @@ Copyright (C) 1985-1988, 1993-1995, 1999-2021 Free Software Foundation, #include <sys/types.h> #include <unistd.h> +#ifdef MSDOS +extern char **environ; +#endif + #include <sys/file.h> #include <fcntl.h> @@ -1200,6 +1204,11 @@ exec_failed (char const *name, int err) child_setup (int in, int out, int err, char **new_argv, char **env, const char *current_dir) { +#ifdef MSDOS + char *pwd_var; + char *temp; + ptrdiff_t i; +#endif #ifdef WINDOWSNT int cpid; HANDLE handles[3]; @@ -1252,6 +1261,22 @@ child_setup (int in, int out, int err, char **new_argv, char **env, exec_failed (new_argv[0], errnum); #else /* MSDOS */ + i = strlen (current_dir); + pwd_var = xmalloc (i + 5); + temp = pwd_var + 4; + memcpy (pwd_var, "PWD=", 4); + stpcpy (temp, current_dir); + + if (i > 2 && IS_DEVICE_SEP (temp[1]) && IS_DIRECTORY_SEP (temp[2])) + { + temp += 2; + i -= 2; + } + + /* Strip trailing slashes for PWD, but leave "/" and "//" alone. */ + while (i > 2 && IS_DIRECTORY_SEP (temp[i - 1])) + temp[--i] = 0; + pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env); xfree (pwd_var); if (pid == -1) @@ -1583,11 +1608,13 @@ emacs_spawn (pid_t *newpid, int std_in, int std_out, int std_err, signal (SIGPROF, SIG_DFL); #endif +#ifdef subprocesses /* Stop blocking SIGCHLD in the child. */ unblock_child_signal (oldset); if (pty_flag) child_setup_tty (std_out); +#endif if (std_err < 0) std_err = std_out; diff --git a/src/fileio.c b/src/fileio.c index 7e3bebca9e..b1f464cf98 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2286,6 +2286,7 @@ DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6, off_t insize = st.st_size; ssize_t copied; +#ifndef MSDOS for (newsize = 0; newsize < insize; newsize += copied) { /* Copy at most COPY_MAX bytes at a time; this is min @@ -2300,6 +2301,7 @@ DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6, break; maybe_quit (); } +#endif /* MSDOS */ /* Fall back on read+write if copy_file_range failed, or if the input is empty and so could be a /proc file. read+write will diff --git a/src/msdos.c b/src/msdos.c index 5da01c9e7c..ad09e02f75 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1874,6 +1874,7 @@ initialize_msdos_display (struct terminal *term) term->redeem_scroll_bar_hook = 0; term->judge_scroll_bars_hook = 0; term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */ + term->defined_color_hook = &tty_defined_color; /* from xfaces.c */ } int @@ -3915,6 +3916,43 @@ readlinkat (int fd, char const *name, char *buffer, size_t buffer_size) return readlink (name, buffer, buffer_size); } + +int +openat (int fd, const char * path, int oflag, int mode) +{ + /* Rely on a hack: an open directory is modeled as file descriptor 0, + as in fstatat. FIXME: Add proper support for openat. */ + char fullname[MAXPATHLEN]; + + if (fd != AT_FDCWD) + { + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) + { + errno = ENAMETOOLONG; + return -1; + } + sprintf (fullname, "%s/%s", dir_pathname, path); + path = fullname; + } + + return open (path, oflag, mode); +} + +int +fchmodat (int fd, const char *path, mode_t mode, int flags) +{ + if (fd != AT_FDCWD) + { + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) + { + errno = ENAMETOOLONG; + return -1; + } + } + + return 0; +} + char * careadlinkat (int fd, char const *filename, char *buffer, size_t buffer_size, @@ -3942,6 +3980,21 @@ careadlinkat (int fd, char const *filename, return buffer; } +int +futimens (int fd, const struct timespec times[2]) +{ + /* TODO */ + return 0; +} + +int +utimensat (int dirfd, const char *pathname, + const struct timespec times[2], int flags) +{ + /* TODO */ + return 0; +} + /* Emulate faccessat(2). */ int faccessat (int dirfd, const char * path, int mode, int flags) diff --git a/src/msdos.h b/src/msdos.h index f7d3b0d702..d58b60ef5d 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -86,6 +86,8 @@ #define O_CLOEXEC 0 typedef int Pixmap; typedef int Display; typedef int Window; + +#define FRAME_X_DISPLAY(ignored) NULL #define PIX_TYPE unsigned long #define XDISPLAY diff --git a/src/process.c b/src/process.c index 6731f8808f..75ba191fa1 100644 --- a/src/process.c +++ b/src/process.c @@ -40,7 +40,10 @@ Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2021 Free Software #include <netinet/in.h> #include <arpa/inet.h> -#endif /* subprocesses */ +#else +#define PIPECONN_P(p) false +#define PIPECONN1_P(p) false +#endif #ifdef HAVE_SETRLIMIT # include <sys/resource.h> @@ -152,6 +155,7 @@ #define ASYNC_RETRY_NSEC 100000000 when exiting. */ bool inhibit_sentinels; +#ifdef subprocesses union u_sockaddr { struct sockaddr sa; @@ -164,8 +168,6 @@ #define ASYNC_RETRY_NSEC 100000000 #endif }; -#ifdef subprocesses - #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC 0 #endif @@ -8238,9 +8240,13 @@ DEFUN ("num-processors", Fnum_processors, Snum_processors, 0, 1, 0, If QUERY is `all', also count processors not available. */) (Lisp_Object query) { +#ifndef MSDOS return make_uint (num_processors (EQ (query, Qall) ? NPROC_ALL : EQ (query, Qcurrent) ? NPROC_CURRENT : NPROC_CURRENT_OVERRIDABLE)); +#else + return make_fixnum (1); +#endif } #ifdef subprocesses @@ -8285,10 +8291,15 @@ open_channel_for_module (Lisp_Object process) { CHECK_PROCESS (process); CHECK_TYPE (PIPECONN_P (process), Qpipe_process_p, process); +#ifndef MSDOS int fd = dup (XPROCESS (process)->open_fd[SUBPROCESS_STDOUT]); if (fd == -1) report_file_error ("Cannot duplicate file descriptor", Qnil); return fd; +#else + /* PIPECONN_P returning true shouldn't be possible on MSDOS. */ + emacs_abort (); +#endif } \f diff --git a/src/thread.c b/src/thread.c index 714b1cd903..7e642b20c0 100644 --- a/src/thread.c +++ b/src/thread.c @@ -19,6 +19,7 @@ Copyright (C) 2012-2021 Free Software Foundation, Inc. #include <config.h> #include <setjmp.h> + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/thread.h b/src/thread.h index cf3ce922c4..b316e916d1 100644 --- a/src/thread.h +++ b/src/thread.h @@ -26,6 +26,7 @@ #define THREAD_H #endif #ifdef MSDOS +#include <time.h> /* struct rpl_timespec */ #include <signal.h> /* sigset_t */ #endif -- 2.33.1 [-- Attachment #3: Type: text/plain, Size: 9 bytes --] Thanks. ^ permalink raw reply related [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-10 13:44 ` Po Lu via Emacs development discussions. @ 2021-12-10 14:26 ` Eli Zaretskii 2021-12-11 1:06 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-10 14:26 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Fri, 10 Dec 2021 21:44:48 +0800 > > I got the MS-DOS port to work. Everything seems to run normally, but > someone might need to run it under a DOS machine (as opposed to the > NTVDM) to be sure. That someone isn't myself, as I don't have a DOS machine. How did you test the build? What commands did you try? My "standard minimum" set of tests for the DOS port is: . Visit a couple of files in different major modes and make sure there're no error messages . Type "C-x" and verify that the "C-x-" prompt appears after a second of delay . Type "M-x display-time-mode RET" and verify that Emacs displays time correctly, updating it every minute . Click on the menu bar and verify that menus work and display with correct colors . Move the mouse over the mode line and verify that it is mouse-sensitive, and help-echo is displayed in the echo-area . "C-h i" and verify that the help-echo for the menu items works when you move the mouse above them, mouse clicks on the header line work, and non-ASCII characters in the manual are correctly replaced with their ASCII equivalents . "M-x compile" to compile some simple C program with a syntax error, and verify that the *Compilation* buffer pops up with the error message(s), the exit code is correctly reported, and clicking on the message displays the offending source line . "M-x customize-variable", select some variable, and verify that the drop-down menus in the Custom buffer work . C-z, verify that you are dropped to a subordinate shell, invoke some shell command, then type "exit RET" to verify that you are back in Emacs > If you have no further comments (and it doesn't break the build on > non-DOS platforms), I would like to install the following change on the > Emacs 28 branch (and hopefully get it to work on master as well: the DOS > port will probably not work there either): Thanks, see the comments below. > --- a/msdos/sed1v2.inp > +++ b/msdos/sed1v2.inp > @@ -55,6 +55,10 @@ s/ *@LIBJPEG@// > s/ *@LIBPNG@// > s/ *@LIBGIF@// > s/ *@LIBXPM@// > +/^HAVE_NATIVE_COMP *=/s/@HAVE_NATIVE_COMP@// > +/^HAVE_PDUMPER *=/s/@HAVE_PDUMPER@// These two should be replaced with "no", not with empty values, I think. > +/^JSON_CFLAGS *=/s/@JSOB_CFLAGS@// > +/^JSON_LIBS *=/s/@JSOB_LIBS@// Typos: should be JSON_CFLAGS and JSON_LIBS. > +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// > +/^JSON_LIBS *=/s/@JSON_LIBS@// > +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// > +/^JSON_LIBS *=/s/@JSON_LIBS@// These should be redundant once you fix the typos above. > +OMIT_GNULIB_MODULE_crypto\/md5 = true Don't we need md5? Why are you omitting it? > +ifneq ($(MSDOS_OBJ),) > +temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \ > + $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT) > + $(AM_V_CCLD)$(CC) -o $@ \ > + $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ > + $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) > + $(MKDIR_P) $(etc) > +else > ## We have to create $(etc) here because init_cmdargs tests its > ## existence when setting Vinstallation_directory (FIXME?). > ## This goes on to affect various things, and the emacs binary fails Couldn't you use the original recipe by a trivial editing (it seems all you need is to replace $@.tmp with $@?), instead of adding an ifdef? Come to think of that, why not use the original recipe without any changes, as it moves $@.tmp to $@ after the link succeeds? > +int > +fchmodat (int fd, const char *path, mode_t mode, int flags) > +{ > + if (fd != AT_FDCWD) > + { > + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) > + { > + errno = ENAMETOOLONG; > + return -1; > + } > + } > + > + return 0; > +} This returns zero without doing anything, why? I think it should call chmod when fd == AT_FDCWD. > +int > +futimens (int fd, const struct timespec times[2]) > +{ > + /* TODO */ > + return 0; > +} > + > +int > +utimensat (int dirfd, const char *pathname, > + const struct timespec times[2], int flags) > +{ > + /* TODO */ > + return 0; > +} What about these TODOs? Thanks a lot for working on this. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-10 14:26 ` Eli Zaretskii @ 2021-12-11 1:06 ` Po Lu 2021-12-11 8:08 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu @ 2021-12-11 1:06 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > How did you test the build? What commands did you try? Basically what you said to do below, minus the custom button dropdown and C-z test. > . "M-x customize-variable", select some variable, and verify that > the drop-down menus in the Custom buffer work > . C-z, verify that you are dropped to a subordinate shell, invoke > some shell command, then type "exit RET" to verify that you are > back in Emacs Both work fine. > Thanks, see the comments below. >> --- a/msdos/sed1v2.inp >> +++ b/msdos/sed1v2.inp >> @@ -55,6 +55,10 @@ s/ *@LIBJPEG@// >> s/ *@LIBPNG@// >> s/ *@LIBGIF@// >> s/ *@LIBXPM@// >> +/^HAVE_NATIVE_COMP *=/s/@HAVE_NATIVE_COMP@// >> +/^HAVE_PDUMPER *=/s/@HAVE_PDUMPER@// > These two should be replaced with "no", not with empty values, I > think. Thanks. >> +/^JSON_CFLAGS *=/s/@JSOB_CFLAGS@// >> +/^JSON_LIBS *=/s/@JSOB_LIBS@// > Typos: should be JSON_CFLAGS and JSON_LIBS. >> +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// >> +/^JSON_LIBS *=/s/@JSON_LIBS@// >> +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// >> +/^JSON_LIBS *=/s/@JSON_LIBS@// > These should be redundant once you fix the typos above. Great catch, thanks. >> +OMIT_GNULIB_MODULE_crypto\/md5 = true > Don't we need md5? Why are you omitting it? It's only needed for the pdumper build, and that module doesn't build on MS-DOS. >> +ifneq ($(MSDOS_OBJ),) >> +temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \ >> + $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT) >> + $(AM_V_CCLD)$(CC) -o $@ \ >> + $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ >> + $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) >> + $(MKDIR_P) $(etc) >> +else >> ## We have to create $(etc) here because init_cmdargs tests its >> ## existence when setting Vinstallation_directory (FIXME?). >> ## This goes on to affect various things, and the emacs binary fails > Couldn't you use the original recipe by a trivial editing (it seems > all you need is to replace $@.tmp with $@?), instead of adding an > ifdef? Come to think of that, why not use the original recipe without > any changes, as it moves $@.tmp to $@ after the link succeeds? The linker apparently doesn't output a "stub" if the filename it's assembling to doesn't end with ".exe", resulting in an invalid binary. >> +int >> +fchmodat (int fd, const char *path, mode_t mode, int flags) >> +{ >> + if (fd != AT_FDCWD) >> + { >> + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) >> + { >> + errno = ENAMETOOLONG; >> + return -1; >> + } >> + } >> + >> + return 0; >> +} > This returns zero without doing anything, why? I think it should call > chmod when fd == AT_FDCWD. Thanks. >> +int >> +futimens (int fd, const struct timespec times[2]) >> +{ >> + /* TODO */ >> + return 0; >> +} >> + >> +int >> +utimensat (int dirfd, const char *pathname, >> + const struct timespec times[2], int flags) >> +{ >> + /* TODO */ >> + return 0; >> +} > > What about these TODOs? I forgot about those, good catch. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-11 1:06 ` Po Lu @ 2021-12-11 8:08 ` Eli Zaretskii 2021-12-11 9:42 ` Po Lu via Emacs development discussions. 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-11 8:08 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Sat, 11 Dec 2021 09:06:26 +0800 > > >> +ifneq ($(MSDOS_OBJ),) > >> +temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \ > >> + $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT) > >> + $(AM_V_CCLD)$(CC) -o $@ \ > >> + $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ > >> + $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) > >> + $(MKDIR_P) $(etc) > >> +else > >> ## We have to create $(etc) here because init_cmdargs tests its > >> ## existence when setting Vinstallation_directory (FIXME?). > >> ## This goes on to affect various things, and the emacs binary fails > > > Couldn't you use the original recipe by a trivial editing (it seems > > all you need is to replace $@.tmp with $@?), instead of adding an > > ifdef? Come to think of that, why not use the original recipe without > > any changes, as it moves $@.tmp to $@ after the link succeeds? > > The linker apparently doesn't output a "stub" if the filename it's > assembling to doesn't end with ".exe", resulting in an invalid binary. That can be remedied by an explicit "stubify foo" command. I believe there are examples of that already in src/Makefile. Or you could call the temporary file $@-tmp instead of $@.tmp, so that it has no extension. And in any case, even if you want not to go through a temporary file, I'd prefer to edit the original recipe in sed1v2.inp instead of adding a DOS-specific recipe, as the former is safer for changes on the release branch. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-11 8:08 ` Eli Zaretskii @ 2021-12-11 9:42 ` Po Lu via Emacs development discussions. 2021-12-11 11:23 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: Po Lu via Emacs development discussions. @ 2021-12-11 9:42 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 528 bytes --] Eli Zaretskii <eliz@gnu.org> writes: > And in any case, even if you want not to go through a temporary file, > I'd prefer to edit the original recipe in sed1v2.inp instead of adding > a DOS-specific recipe, as the former is safer for changes on the > release branch. Thanks, I opted to implement this option, and it works well. I also implemented futimens (and based on that, utimensat), and fixed the rest of the issues you outlined above. If the following patch looks good to you, I will install it on emacs-28. Thanks. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Fix-the-DJGPP-port.patch --] [-- Type: text/x-patch, Size: 22616 bytes --] From 08891c91c8ae9fe2311b6cb3feddff8b80fcd632 Mon Sep 17 00:00:00 2001 From: Po Lu <luangruo@yahoo.com> Date: Fri, 10 Dec 2021 21:36:59 +0800 Subject: [PATCH] Fix the DJGPP port * config.bat: * msdos/sed1v2.inp: * msdos/sed2v2.inp: * msdos/sed3v2.inp: * msdos/sedlibmk.inp: Update for Emacs 28. * msdos/langinfo.h: New file. * lisp/loadup.el: Use correct path to temacs when dumping on MS-DOS. * src/callproc.c (environ) [MSDOS]: New declaration. (child_setup, emacs_spawn): Update MS-DOS parts for Emacs 28. * src/fileio.c (Fcopy_file): Don't use copy_file_range on MS-DOS. * src/msdos.c (initialize_msdos_display): Add `defined_color_hook'. (openat, fchmodat, futimens, utimensat): New functions. * src/msdos.h (FRAME_X_DISPLAY): New macro. * src/process.c: Make some more things conditional on subprocess support. (PIPECONN_P, PIPECONN1_P) [!subprocesses]: New placeholder macros. (Fnum_processors): Return 1 on MSDOS. (open_channel_for_module): Avoid subprocess specific code on MSDOS. --- config.bat | 7 +++- lisp/loadup.el | 4 +- msdos/langinfo.h | 20 ++++++++++ msdos/sed1v2.inp | 24 +++++++++++- msdos/sed2v2.inp | 1 + msdos/sed3v2.inp | 1 + msdos/sedlibmk.inp | 63 +++++++++++++++++++------------ src/callproc.c | 27 ++++++++++++++ src/fileio.c | 2 + src/msdos.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++ src/msdos.h | 2 + src/process.c | 17 +++++++-- src/thread.h | 1 + 13 files changed, 230 insertions(+), 31 deletions(-) create mode 100644 msdos/langinfo.h diff --git a/config.bat b/config.bat index cba7336099..e4332cd326 100644 --- a/config.bat +++ b/config.bat @@ -283,6 +283,7 @@ If Exist execinfo.in.h update execinfo.in.h execinfo.in-h If Exist fcntl.in.h update fcntl.in.h fcntl.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h If Exist getopt-cdefs.in.h update getopt-cdefs.in.h getopt-cdefs.in-h +If Exist ieee754.in.h update ieee754.in.h ieee754.in-h If Exist inttypes.in.h update inttypes.in.h inttypes.in-h If Exist limits.in.h update limits.in.h limits.in-h If Exist signal.in.h update signal.in.h signal.in-h @@ -293,6 +294,7 @@ If Exist stdint.in.h update stdint.in.h stdint.in-h If Exist stdio.in.h update stdio.in.h stdio.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h If Exist string.in.h update string.in.h string.in-h +If Exist sys_random.in.h update sys_random.in.h sys_random.in-h If Exist sys_select.in.h update sys_select.in.h sys_select.in-h If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist sys_time.in.h update sys_time.in.h sys_time.in-h @@ -308,10 +310,13 @@ rm -f makefile.tmp sed -f ../msdos/sedlibcf.inp < gnulib.mk-in > gnulib.tmp sed -f ../msdos/sedlibmk.inp < gnulib.tmp > gnulib.mk rm -f gnulib.tmp -Rem Create .d files for new files in lib/ +Rem Create .d files for new files in lib/ and lib/malloc/ If Not Exist deps\stamp mkdir deps for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f echo deps-stamp > deps\stamp +If Not Exist deps\malloc\stamp mkdir deps\malloc +for %%f in (malloc\*.c) do @call ..\msdos\depfiles.bat %%f +echo deps-stamp > deps\malloc\stamp cd .. rem ---------------------------------------------------------------------- Echo Configuring the lisp directory... diff --git a/lisp/loadup.el b/lisp/loadup.el index e8ecb67d56..4da0ff7385 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -549,7 +549,9 @@ (lexical-binding nil)) (if (member tmp-dump-mode '("pdump" "pbootstrap")) (dump-emacs-portable (expand-file-name output invocation-directory)) - (dump-emacs output "temacs") + (dump-emacs output (if (eq system-type 'ms-dos) + "temacs.exe" + "temacs")) (message "%d pure bytes used" pure-bytes-used)) (setq success t)) (unless success diff --git a/msdos/langinfo.h b/msdos/langinfo.h new file mode 100644 index 0000000000..a74c3f7f8e --- /dev/null +++ b/msdos/langinfo.h @@ -0,0 +1,20 @@ +/* Replacement langinfo.h file for building GNU Emacs on MS-DOS with DJGPP. + +Copyright (C) 2021 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ + +#define nl_langinfo(ignore) "cp437" diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 5d82af66d9..60f67e4303 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -55,6 +55,10 @@ s/ *@LIBJPEG@// s/ *@LIBPNG@// s/ *@LIBGIF@// s/ *@LIBXPM@// +/^HAVE_NATIVE_COMP *=/s/@HAVE_NATIVE_COMP@/no/ +/^HAVE_PDUMPER *=/s/@HAVE_PDUMPER@/no/ +/^CHECK_STRUCTS *=/s/@CHECK_STRUCTS@// +/^RUN_TEMACS \=/s/temacs/temacs.exe/ /^XFT_LIBS *=/s/@XFT_LIBS@// /^XCB_LIBS *=/s/@XCB_LIBS@// /^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@// @@ -150,6 +154,18 @@ s/ *@LIBXPM@// /^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/ /^W32_OBJ *=/s/@W32_OBJ@// /^W32_LIBS *=/s/@W32_LIBS@// +/^JSON_OBJ *=/s/@JSON_OBJ@// +/^JSON_CFLAGS *=/s/@JSON_CFLAGS@// +/^JSON_LIBS *=/s/@JSON_LIBS@// +/^LIBGCCJIT_OBJ *=/s/@LIBGCCJIT_OBJ@// +/^LIBGCCJIT_CFLAGS *=/s/@LIBGCCJIT_CFLAGS@// +/^LIBGCCJIT_LIBS *=/s/@LIBGCCJIT_LIBS@// +/^HARFBUZZ_CFLAGS *=/s/@HARFBUZZ_CFLAGS@// +/^HARFBUZZ_LIBS *=/s/@HARFBUZZ_LIBS@// +/^LCMS2_CFLAGS *=/s/@LCMS2_CFLAGS@// +/^LCMS2_LIBS *=/s/@LCMS2_LIBS@// +/^LIBGMP *=/s/@LIBGMP@// +/^DYNLIB_OBJ *=/s/@DYNLIB_OBJ@// /^version *=/s/@[^@\n]*@// /^EMACSRES *=/s/@EMACSRES@// /^W32_RES_LINK *=/s/@W32_RES_LINK@// @@ -162,6 +178,7 @@ s/ *@LIBXPM@// /^AUTO_DEPEND *=/s/@AUTO_DEPEND@/yes/ /^PAXCTL_dumped *=/s/=.*$/=/ /^PAXCTL_notdumped *=/s/=.*$/=/ +/^DUMPING *=/s/@DUMPING@/unexec/ /^lisp\.mk:/,/^$/c\ lisp.mk: $(lispsource)/loadup.el\ @rm -f $@\ @@ -183,6 +200,7 @@ lisp.mk: $(lispsource)/loadup.el\ /^ *ifneq (\$(PAXCTL_dumped),)/,/^ *endif/d /^ *ln /s/ln /cp / /^ fi/d +/ifeq (\$(HAVE_NATIVE_COMP):\$(NATIVE_DISABLED),yes:)/,/endif/d /^ *\$(RUN_TEMACS) /i\ stubedit temacs.exe minstack=1024k /^ *LC_ALL=C \$(RUN_TEMACS)/i\ @@ -214,8 +232,8 @@ s/echo.*buildobj.lst/dj&/ /^ -\{0,1\}rm -f/s/\\#/#/ /^ echo.* buildobj.h/s|echo |djecho | /^buildobj\.h:/,/^ *\$(AM_V_at)mv /{ - /^ *\$(AM_V_GEN)for /,/^ *done /c\ - djecho "$(ALLOBJS)" | sed -e 's/^ */"/' -e 's/ *$$/"/' -e 's/ */", "/g' >>$@.tmp + /^ *\$(AM_V_GEN)for /,/mv \$@.tmp \$@/c\ + djecho "$(ALLOBJS)" | sed -e 's/^ */"/' -e 's/ *$$/"/' -e 's/ */", "/g' >>$@ } # Remove or replace dependencies we cannot have /^\.PRECIOUS: /s!\.\./config.status !! @@ -236,3 +254,5 @@ s| -I\$(srcdir)/\.\./lib|| s| -I\$(top_srcdir)/lib|| s| -I\. -I\$(srcdir)| -I.| /^ *test "X/d +/\$(CC) -o \$@.tmp/s/\$@.tmp/\$@/ +/mv \$@.tmp \$@/d \ No newline at end of file diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 5238f2dfc6..ae5d46fe86 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -37,6 +37,7 @@ /^#undef HAVE_STRUCT_UTIMBUF *$/s/^.*$/#define HAVE_STRUCT_UTIMBUF 1/ /^#undef LOCALTIME_CACHE *$/s/^.*$/#define LOCALTIME_CACHE 1/ /^#undef HAVE_TZSET *$/s/^.*$/#define HAVE_TZSET 1/ +/^#undef HAVE_UNEXEC *$/s/^.*$/#define HAVE_UNEXEC 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index 8b9bb0679b..f7c9eb05ba 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -34,6 +34,7 @@ /^LIBS_SYSTEM *=/s/@[^@\n]*@//g /^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g +/^LIB_GETRANDOM *=/s/@[^@\n]*@//g /^CFLAGS *=/s!=.*$!=-O2 -g! /^CPPFLAGS *=/s/@CPPFLAGS@// /^LDFLAGS *=/s/@LDFLAGS@// diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 825be84968..b3b94297d6 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -144,7 +144,7 @@ s/@PACKAGE@/emacs/ /^CPP *=/s/@[^@\n]*@/gcc -e/ /^CPPFLAGS *=/s/@[^@\n]*@// /^CCDEPMODE *=/s/@[^@\n]*@/depmode=gcc3/ -/^CFLAGS *=/s/@[^@\n]*@/-g -O2/ +/^CFLAGS *=/s/@[^@\n]*@/-g -O2 -I$\(srcdir\)\/..\/msdos/ /^CYGPATH_W *=/s/@[^@\n]*@// /^CYGWIN_OBJ *=/s/@[^@\n]*@// /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// @@ -170,28 +170,28 @@ s/@PACKAGE@/emacs/ /^BITSIZEOF_WCHAR_T *=/s/@BITSIZEOF_WCHAR_T@/16/ /^BITSIZEOF_WINT_T *=/s/@BITSIZEOF_WINT_T@/32/ /^APPLE_UNIVERSAL_BUILD *=/s/@APPLE_UNIVERSAL_BUILD@/0/ -# -# Most GNULIB_* are replaced with zero even though DJGPP does not have -# these features. That's because the gnulib replacements cannot +# Most GL_GNULIB_* are replaced with zero even though DJGPP does not +# have these features. That's because the gnulib replacements cannot # possibly work for DJGPP, so we prefer to fail the link than have a # subtly botched executable. Those replacements that _are_ needed # should be before the last catch-all rule. -/^GNULIB_ATOLL *=/s/@GNULIB_ATOLL@/1/ -/^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ -/^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/1/ -/^GNULIB_FDATASYNC *=/s/@GNULIB_FDATASYNC@/1/ -/^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ -/^GNULIB_GL_UNISTD_H_GETOPT *=/s/@GNULIB_GL_UNISTD_H_GETOPT@/1/ -/^GNULIB_MEMRCHR *=/s/@GNULIB_MEMRCHR@/1/ -/^GNULIB_MKOSTEMP *=/s/@GNULIB_MKOSTEMP@/1/ -/^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/1/ -/^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ -/^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/1/ -/^GNULIB_TIME_RZ *=/s/@GNULIB_TIME_RZ@/1/ -/^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ -/^GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/ -/^GSETTINGS_CFLAGS *=/s/@[^@\n]*@// -/^GSETTINGS_LIBS *=/s/@[^@\n]*@// +/^GL_GNULIB_ATOLL *=/s/@GL_GNULIB_ATOLL@/1/ +/^GL_GNULIB_DUP3 *=/s/@GL_GNULIB_DUP3@/1/ +/^GL_GNULIB_ENVIRON *=/s/@GL_GNULIB_ENVIRON@/1/ +/^GL_GNULIB_FDATASYNC *=/s/@GL_GNULIB_FDATASYNC@/1/ +/^GL_GNULIB_GETLOADAVG *=/s/@GL_GNULIB_GETLOADAVG@/1/ +/^GL_GNULIB_UNISTD_H_GETOPT *=/s/@GL_GNULIB_UNISTD_H_GETOPT@/1/ +/^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/ +/^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/ +/^GL_GNULIB_MKOSTEMP *=/s/@GL_GNULIB_MKOSTEMP@/1/ +/^GL_GNULIB_MKTIME *=/s/@GL_GNULIB_MKTIME@/1/ +/^GL_GNULIB_TIME_R *=/s/@GL_GNULIB_TIME_R@/1/ +/^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/ +/^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/ +/^GL_GNULIB_UNSETENV *=/s/@GL_GNULIB_UNSETENV@/1/ +/^GL_GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/ +/^GL_GSETTINGS_CFLAGS *=/s/@[^@\n]*@// +/^GL_GSETTINGS_LIBS *=/s/@[^@\n]*@// # # Edit the HAVE_foo variables /^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/ @@ -253,6 +253,7 @@ s/@PACKAGE@/emacs/ /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ +/^HAVE_LIBGMP *=/s/@HAVE_LIBGMP@/0/ /^HAVE__BOOL *=/s/@HAVE__BOOL@/1/ /^HAVE__EXIT *=/s/@HAVE__EXIT@/1/ /^HAVE_[^ =]* *= *@/s/@[^@\n]*@/0/ @@ -265,7 +266,9 @@ s/@PACKAGE@/emacs/ /^LIBS *=/s/@[^@\n]*@// /^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ # MKDIR_P lines are edited further below -/^MKDIR_P *=/s/@MKDIR_P@// +# MKDIR_P is only used to create lib/malloc, and the folder is +# already present in the distribution, so this should work fine. +/^MKDIR_P *=/s/@MKDIR_P@/echo/ /^NEXT_AS_FIRST_DIRECTIVE_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/ /^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/ @@ -309,6 +312,7 @@ s/@PACKAGE@/emacs/ /^REPLACE_MKTIME *=/s/@[^@\n]*@/1/ # We don't want any other gnulib replacement functions /^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/ +/^LIB_GETRANDOM[^ =]* *= *@/s/@[^@\n]*@// /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ @@ -317,18 +321,23 @@ s/@PACKAGE@/emacs/ /^ERRNO_H *=/s/@[^@\n]*@// /^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/ /^GETOPT_CDEFS_H *=/s/@[^@\n]*@/getopt-cdefs.h/ +/^GMP_H *=/s/@[^@\n]*@/gmp.h/ /^LIMITS_H *=/s/@[^@\n]*@/limits.h/ +/^IEEE754_H *=/s/@[^@\n]*@/ieee754.h/ /^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDDEF_H *=/s/@[^@\n]*@/stddef.h/ /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ /^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ +/^TIME_H_DEFINES_TIME_UTC *=/s/@[^@\n]*@/0/ +/^UNISTD_H_HAVE_SYS_RANDOM_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ /^UNISTD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/ /^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ /^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// +/^GNULIBHEADERS_OVERRIDE_WINT_T *=/s/@[^@\n]*@/0/ /^WINDOWS_64_BIT_OFF_T *=/s/@WINDOWS_64_BIT_OFF_T@/0/ /^WINDOWS_64_BIT_ST_SIZE *=/s/@WINDOWS_64_BIT_ST_SIZE@/0/ /^WINDOWS_STAT_INODES *=/s/@WINDOWS_STAT_INODES@/0/ @@ -337,7 +346,7 @@ s/@PACKAGE@/emacs/ /am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/ /am__append_2 *=.*verify\.h/s/@[^@\n]*@// /^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@// -/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o time_rz.o timegm.o mktime.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o execinfo.o/ +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o getrandom.o memrchr.o mempcpy.o regex.o memmem.o sig2str.o sigdescr_np.o time_r.o time_rz.o timegm.o mktime.o mini-gmp-gnulib.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o execinfo.o tempname.o/ /^am__append_[1-9][0-9]* *=/,/^[^ ]/{ s/ *inttypes\.h// s| *sys/select\.h|| @@ -394,15 +403,19 @@ s/^ -*test -z.*|| rm/ -rm/ s/@echo /@djecho / # # Determine which headers to generate -s/= @GL_GENERATE_ALLOCA_H@/= 1/ +s/= @GL_GENERATE_ALLOCA_H_TRUE@/= 1/ s/= @GL_GENERATE_BYTESWAP_H@/= 1/ s/= @GL_GENERATE_EXECINFO_H@/= 1/ +s/= @GL_GENERATE_IEEE754_H@/= 1/ s/= @GL_GENERATE_STDALIGN_H@/= 1/ s/= @GL_GENERATE_STDDEF_H@/= 1/ s/= @GL_GENERATE_STDINT_H@/= 1/ s/= @GL_GENERATE_LIMITS_H@/= 1/ s/= @GL_GENERATE_ERRNO_H@/= / s/= @GL_GENERATE_LIMITS_H@/= / +s/= @GL_GENERATE_GMP_GMP_H@/= 1/ +s/= @GL_GENERATE_MINI_GMP_H@/= 1/ +s/\$\(MKDIR_P\) malloc// # # Determine which modules to build and which to omit /^noinst_LIBRARIES /a\ @@ -413,6 +426,7 @@ OMIT_GNULIB_MODULE_careadlinkat = true\ OMIT_GNULIB_MODULE_cloexec = true\ OMIT_GNULIB_MODULE_dirent = true\ OMIT_GNULIB_MODULE_dirfd = true\ +OMIT_GNULIB_MODULE_scratch_buffer = true\ OMIT_GNULIB_MODULE_dup2 = true\ OMIT_GNULIB_MODULE_errno = true\ OMIT_GNULIB_MODULE_euidaccess = true\ @@ -439,7 +453,8 @@ OMIT_GNULIB_MODULE_strtoimax = true\ OMIT_GNULIB_MODULE_strtoll = true\ OMIT_GNULIB_MODULE_symlink = true\ OMIT_GNULIB_MODULE_sys_select = true\ -OMIT_GNULIB_MODULE_sys_time = true +OMIT_GNULIB_MODULE_sys_time = true\ +OMIT_GNULIB_MODULE_crypto\/md5 = true /^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\ sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@ diff --git a/src/callproc.c b/src/callproc.c index fad81694b0..f7c55d0486 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -25,6 +25,10 @@ Copyright (C) 1985-1988, 1993-1995, 1999-2021 Free Software Foundation, #include <sys/types.h> #include <unistd.h> +#ifdef MSDOS +extern char **environ; +#endif + #include <sys/file.h> #include <fcntl.h> @@ -1200,6 +1204,11 @@ exec_failed (char const *name, int err) child_setup (int in, int out, int err, char **new_argv, char **env, const char *current_dir) { +#ifdef MSDOS + char *pwd_var; + char *temp; + ptrdiff_t i; +#endif #ifdef WINDOWSNT int cpid; HANDLE handles[3]; @@ -1252,6 +1261,22 @@ child_setup (int in, int out, int err, char **new_argv, char **env, exec_failed (new_argv[0], errnum); #else /* MSDOS */ + i = strlen (current_dir); + pwd_var = xmalloc (i + 5); + temp = pwd_var + 4; + memcpy (pwd_var, "PWD=", 4); + stpcpy (temp, current_dir); + + if (i > 2 && IS_DEVICE_SEP (temp[1]) && IS_DIRECTORY_SEP (temp[2])) + { + temp += 2; + i -= 2; + } + + /* Strip trailing slashes for PWD, but leave "/" and "//" alone. */ + while (i > 2 && IS_DIRECTORY_SEP (temp[i - 1])) + temp[--i] = 0; + pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env); xfree (pwd_var); if (pid == -1) @@ -1583,11 +1608,13 @@ emacs_spawn (pid_t *newpid, int std_in, int std_out, int std_err, signal (SIGPROF, SIG_DFL); #endif +#ifdef subprocesses /* Stop blocking SIGCHLD in the child. */ unblock_child_signal (oldset); if (pty_flag) child_setup_tty (std_out); +#endif if (std_err < 0) std_err = std_out; diff --git a/src/fileio.c b/src/fileio.c index 7e3bebca9e..b1f464cf98 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2286,6 +2286,7 @@ DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6, off_t insize = st.st_size; ssize_t copied; +#ifndef MSDOS for (newsize = 0; newsize < insize; newsize += copied) { /* Copy at most COPY_MAX bytes at a time; this is min @@ -2300,6 +2301,7 @@ DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6, break; maybe_quit (); } +#endif /* MSDOS */ /* Fall back on read+write if copy_file_range failed, or if the input is empty and so could be a /proc file. read+write will diff --git a/src/msdos.c b/src/msdos.c index 5da01c9e7c..06cc3e4f0a 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1874,6 +1874,7 @@ initialize_msdos_display (struct terminal *term) term->redeem_scroll_bar_hook = 0; term->judge_scroll_bars_hook = 0; term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */ + term->defined_color_hook = &tty_defined_color; /* from xfaces.c */ } int @@ -3915,6 +3916,43 @@ readlinkat (int fd, char const *name, char *buffer, size_t buffer_size) return readlink (name, buffer, buffer_size); } + +int +openat (int fd, const char * path, int oflag, int mode) +{ + /* Rely on a hack: an open directory is modeled as file descriptor 0, + as in fstatat. FIXME: Add proper support for openat. */ + char fullname[MAXPATHLEN]; + + if (fd != AT_FDCWD) + { + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) + { + errno = ENAMETOOLONG; + return -1; + } + sprintf (fullname, "%s/%s", dir_pathname, path); + path = fullname; + } + + return open (path, oflag, mode); +} + +int +fchmodat (int fd, const char *path, mode_t mode, int flags) +{ + if (fd != AT_FDCWD) + { + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) + { + errno = ENAMETOOLONG; + return -1; + } + } + + return chmod (path, mode); +} + char * careadlinkat (int fd, char const *filename, char *buffer, size_t buffer_size, @@ -3942,6 +3980,60 @@ careadlinkat (int fd, char const *filename, return buffer; } +int +futimens (int fd, const struct timespec times[2]) +{ + struct tm *tm; + struct ftime ft; + time_t t; + + block_input (); + if (times[1].tv_sec == UTIME_NOW) + t = time (NULL); + else + t = times[1].tv_sec; + + tm = localtime (&t); + ft.ft_tsec = min (59, tm->tm_sec); + ft.ft_min = tm->tm_min; + ft.ft_hour = tm->tm_hour; + ft.ft_day = tm->tm_mday; + ft.ft_month = tm->tm_mon + 1; + ft.ft_year = max (0, tm->tm_year - 80); + unblock_input (); + + return setftime (fd, &ft); +} + +int +utimensat (int dirfd, const char *pathname, + const struct timespec times[2], int flags) +{ + int fd; + char fullname[MAXPATHLEN]; + + if (dirfd != AT_FDCWD) + { + if (strlen (dir_pathname) + strlen (pathname) + 1 >= MAXPATHLEN) + { + errno = ENAMETOOLONG; + return -1; + } + sprintf (fullname, "%s/%s", dir_pathname, pathname); + pathname = fullname; + } + + /* Rely on a hack: dirfd in its current usage in Emacs is always + AT_FDCWD. */ + + fd = open (pathname, O_WRONLY); + + if (fd < 0) + return -1; + + return futimens (fd, times); +} + /* Emulate faccessat(2). */ int faccessat (int dirfd, const char * path, int mode, int flags) diff --git a/src/msdos.h b/src/msdos.h index f7d3b0d702..d58b60ef5d 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -86,6 +86,8 @@ #define O_CLOEXEC 0 typedef int Pixmap; typedef int Display; typedef int Window; + +#define FRAME_X_DISPLAY(ignored) NULL #define PIX_TYPE unsigned long #define XDISPLAY diff --git a/src/process.c b/src/process.c index 6731f8808f..75ba191fa1 100644 --- a/src/process.c +++ b/src/process.c @@ -40,7 +40,10 @@ Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2021 Free Software #include <netinet/in.h> #include <arpa/inet.h> -#endif /* subprocesses */ +#else +#define PIPECONN_P(p) false +#define PIPECONN1_P(p) false +#endif #ifdef HAVE_SETRLIMIT # include <sys/resource.h> @@ -152,6 +155,7 @@ #define ASYNC_RETRY_NSEC 100000000 when exiting. */ bool inhibit_sentinels; +#ifdef subprocesses union u_sockaddr { struct sockaddr sa; @@ -164,8 +168,6 @@ #define ASYNC_RETRY_NSEC 100000000 #endif }; -#ifdef subprocesses - #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC 0 #endif @@ -8238,9 +8240,13 @@ DEFUN ("num-processors", Fnum_processors, Snum_processors, 0, 1, 0, If QUERY is `all', also count processors not available. */) (Lisp_Object query) { +#ifndef MSDOS return make_uint (num_processors (EQ (query, Qall) ? NPROC_ALL : EQ (query, Qcurrent) ? NPROC_CURRENT : NPROC_CURRENT_OVERRIDABLE)); +#else + return make_fixnum (1); +#endif } #ifdef subprocesses @@ -8285,10 +8291,15 @@ open_channel_for_module (Lisp_Object process) { CHECK_PROCESS (process); CHECK_TYPE (PIPECONN_P (process), Qpipe_process_p, process); +#ifndef MSDOS int fd = dup (XPROCESS (process)->open_fd[SUBPROCESS_STDOUT]); if (fd == -1) report_file_error ("Cannot duplicate file descriptor", Qnil); return fd; +#else + /* PIPECONN_P returning true shouldn't be possible on MSDOS. */ + emacs_abort (); +#endif } \f diff --git a/src/thread.h b/src/thread.h index cf3ce922c4..b316e916d1 100644 --- a/src/thread.h +++ b/src/thread.h @@ -26,6 +26,7 @@ #define THREAD_H #endif #ifdef MSDOS +#include <time.h> /* struct rpl_timespec */ #include <signal.h> /* sigset_t */ #endif -- 2.33.1 ^ permalink raw reply related [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-11 9:42 ` Po Lu via Emacs development discussions. @ 2021-12-11 11:23 ` Eli Zaretskii 2021-12-11 11:51 ` Po Lu 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-11 11:23 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Sat, 11 Dec 2021 17:42:31 +0800 > > Eli Zaretskii <eliz@gnu.org> writes: > > > And in any case, even if you want not to go through a temporary file, > > I'd prefer to edit the original recipe in sed1v2.inp instead of adding > > a DOS-specific recipe, as the former is safer for changes on the > > release branch. > > Thanks, I opted to implement this option, and it works well. > > I also implemented futimens (and based on that, utimensat), and fixed > the rest of the issues you outlined above. > > If the following patch looks good to you, I will install it on > emacs-28. Thanks. A couple of minor gotchas below, and then you can install this. > +int > +fchmodat (int fd, const char *path, mode_t mode, int flags) > +{ > + if (fd != AT_FDCWD) > + { > + if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN) > + { > + errno = ENAMETOOLONG; > + return -1; > + } > + } > + > + return chmod (path, mode); > +} No support for AT_FDCWD here (by using dir_pathname)? > +int > +futimens (int fd, const struct timespec times[2]) > +{ > + struct tm *tm; > + struct ftime ft; > + time_t t; > + > + block_input (); > + if (times[1].tv_sec == UTIME_NOW) > + t = time (NULL); > + else > + t = times[1].tv_sec; > + > + tm = localtime (&t); > + ft.ft_tsec = min (59, tm->tm_sec); ft_sec is 0 to 29, in 2-sec units (as DOS has only 2-sec resolution in file time stamps), so you need to scale it here. > +int > +utimensat (int dirfd, const char *pathname, > + const struct timespec times[2], int flags) > +{ > + int fd; > + char fullname[MAXPATHLEN]; > + > + if (dirfd != AT_FDCWD) > + { > + if (strlen (dir_pathname) + strlen (pathname) + 1 >= MAXPATHLEN) > + { > + errno = ENAMETOOLONG; > + return -1; > + } > + sprintf (fullname, "%s/%s", dir_pathname, pathname); > + pathname = fullname; > + } > + > + /* Rely on a hack: dirfd in its current usage in Emacs is always > + AT_FDCWD. */ This comment seems to be out of place, you need to move it higher up, I believe. > + fd = open (pathname, O_WRONLY); > + > + if (fd < 0) > + return -1; > + > + return futimens (fd, times); This leaks a file descriptor, since you open the file, but don't close it. Thanks. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-11 11:23 ` Eli Zaretskii @ 2021-12-11 11:51 ` Po Lu 0 siblings, 0 replies; 65+ messages in thread From: Po Lu @ 2021-12-11 11:51 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > This leaks a file descriptor, since you open the file, but don't close > it. Thanks, I fixed the gotchas and pushed. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-06 13:26 ` Po Lu 2021-12-06 13:41 ` Po Lu @ 2021-12-06 13:55 ` Eli Zaretskii 1 sibling, 0 replies; 65+ messages in thread From: Eli Zaretskii @ 2021-12-06 13:55 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org > Date: Mon, 06 Dec 2021 21:26:11 +0800 > > > GCC 3.4.6 > > GDB 7.2 > > These versions are what I have installed, but see below: > > > Binutils 2.26 > > I used binutils 2.37, because I couldn't find 2.26 on the djgpp download > server. Could you tell me where I can obtain binutils 2.26 for DJGPP? In the deleted/v2gnu/ directory. Use the latest release of 2.26 (I think there were 2 or 3). ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-02 22:41 Emacs pretest 28.0.90 is out Stefan Kangas 2021-12-05 3:38 ` Po Lu @ 2021-12-05 3:42 ` David O'Toole 2021-12-05 9:34 ` H. Dieter Wilhelm 2021-12-09 1:31 ` pretest installed (was: Emacs pretest 28.0.90 is out) andrés ramírez 2021-12-12 9:20 ` MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out H. Dieter Wilhelm 3 siblings, 1 reply; 65+ messages in thread From: David O'Toole @ 2021-12-05 3:42 UTC (permalink / raw) To: Stefan Kangas; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1404 bytes --] Appears to be working wonderfully, including native compilation. Thanks everyone for Emacs :) On Thu, Dec 2, 2021 at 5:43 PM Stefan Kangas <stefan@marxist.se> wrote: > Hi! > > The first pretest for what will be the 28.1 release of Emacs (the > extensible text editor) is available at: > > https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz > > The tarball is signed; you can get the PGP signature file at: > > https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz.sig > > Please give it as much testing as you can. > > As always, if you encounter problems building or using Emacs, > send a report to bug-gnu-emacs@gnu.org with full details > (if possible, use M-x report-emacs-bug). > > Thanks for helping to test Emacs. > > -------------------------------------- > > To verify that the tarball is intact, download both the .sig and > the tarball, and run this command: > > gpg --verify emacs-28.0.90.tar.xz.sig > > If that command fails because you don't have the required public key, > run this command to import it: > > gpg --keyserver keys.openpgp.org --recv-keys \ > CEA1DE21AB108493CC9C65742E82323B8F4353EE > > You can also run sha1sum or sha256sum and confirm that these > checksums match: > > SHA1 emacs-28.0.90.tar.xz > 7f824b6c7ea4a98baf86a97eea8c33f0029aab4e > > SHA256 emacs-28.0.90.tar.xz > 6f10c72f9358fe1e39c761faf84bc1e5d81fb848f282c95bec34a9a77bc16288 > [-- Attachment #2: Type: text/html, Size: 2188 bytes --] ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: Emacs pretest 28.0.90 is out 2021-12-05 3:42 ` David O'Toole @ 2021-12-05 9:34 ` H. Dieter Wilhelm 0 siblings, 0 replies; 65+ messages in thread From: H. Dieter Wilhelm @ 2021-12-05 9:34 UTC (permalink / raw) To: David O'Toole; +Cc: Stefan Kangas, emacs-devel "David O'Toole" <deeteeoh1138@gmail.com> writes: > Appears to be working wonderfully, including native compilation. > Thanks everyone for Emacs :) Yes indeed, I was able to compile Emacs-28.0.90 under MinGW64 as well. -- Best wishes H. Dieter Wilhelm Zwingenberg, Germany ^ permalink raw reply [flat|nested] 65+ messages in thread
* pretest installed (was: Emacs pretest 28.0.90 is out) 2021-12-02 22:41 Emacs pretest 28.0.90 is out Stefan Kangas 2021-12-05 3:38 ` Po Lu 2021-12-05 3:42 ` David O'Toole @ 2021-12-09 1:31 ` andrés ramírez 2021-12-12 9:20 ` MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out H. Dieter Wilhelm 3 siblings, 0 replies; 65+ messages in thread From: andrés ramírez @ 2021-12-09 1:31 UTC (permalink / raw) To: Stefan Kangas; +Cc: emacs-devel Thanks guys. This installation is on a lower end SBC (machine). Several elpa packages were affected by make-obsolete. So take that in account when installing. JIC You have some older version of packages. Best Regards ,---- [ ] | Welcome to the Emacs shell | | ~ $ emacs-version; (describe-variable 'system-configuration-options) | GNU Emacs 28.0.90 (build 2, armv7l-unknown-linux-gnueabihf, X toolkit, cairo version 1.17.4, Xaw3d scroll bars) | of 2021-12-08 | system-configuration-options is a variable defined in ‘C source code’. | | Its value is | "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-modules --without-gconf --without-gsettings --with-wide-int --with-harfbuzz --with-json=yes --enable-link-time-optimization --with-native-compilation --with-x-toolkit=lucid --with-xft --with-xaw3d --without-compress-install '--program-transform-name=s/\\([ec]tags\\)/\\1.emacs/' 'CFLAGS=-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -fstack-clash-protection -flto -fuse-linker-plugin' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now CPPFLAGS=" | | String containing the configuration options Emacs was built with. | | ~ $ `---- ^ permalink raw reply [flat|nested] 65+ messages in thread
* MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-02 22:41 Emacs pretest 28.0.90 is out Stefan Kangas ` (2 preceding siblings ...) 2021-12-09 1:31 ` pretest installed (was: Emacs pretest 28.0.90 is out) andrés ramírez @ 2021-12-12 9:20 ` H. Dieter Wilhelm 2021-12-12 9:32 ` Eli Zaretskii 3 siblings, 1 reply; 65+ messages in thread From: H. Dieter Wilhelm @ 2021-12-12 9:20 UTC (permalink / raw) To: Stefan Kangas; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 413 bytes --] Hello when using the TeX input method with GNU Emacs 28.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-12-08 I'm getting for "ConsonantUnderscoreConsontant" examples this eₑ mₘ sₛ. But for the MingGW build it looks strange, please consider the attached images. (The image was done with 28.0.69, but it looks strange for 28.0.90 as well.) [-- Attachment #2: utf-8_encoding_Emacs_2021-12-11.png --] [-- Type: image/png, Size: 43748 bytes --] [-- Attachment #3: Type: text/plain, Size: 1423 bytes --] Thanks for Emacs Dieter PS: For the builds I used the 28.0.90 tags in git Stefan Kangas <stefan@marxist.se> writes: > Hi! > > The first pretest for what will be the 28.1 release of Emacs (the > extensible text editor) is available at: > > https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz > > The tarball is signed; you can get the PGP signature file at: > > https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.0.90.tar.xz.sig > > Please give it as much testing as you can. > > As always, if you encounter problems building or using Emacs, > send a report to bug-gnu-emacs@gnu.org with full details > (if possible, use M-x report-emacs-bug). > > Thanks for helping to test Emacs. > > -------------------------------------- > > To verify that the tarball is intact, download both the .sig and > the tarball, and run this command: > > gpg --verify emacs-28.0.90.tar.xz.sig > > If that command fails because you don't have the required public key, > run this command to import it: > > gpg --keyserver keys.openpgp.org --recv-keys \ > CEA1DE21AB108493CC9C65742E82323B8F4353EE > > You can also run sha1sum or sha256sum and confirm that these > checksums match: > > SHA1 emacs-28.0.90.tar.xz > 7f824b6c7ea4a98baf86a97eea8c33f0029aab4e > > SHA256 emacs-28.0.90.tar.xz > 6f10c72f9358fe1e39c761faf84bc1e5d81fb848f282c95bec34a9a77bc16288 > > -- Best wishes H. Dieter Wilhelm Zwingenberg, Germany ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-12 9:20 ` MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out H. Dieter Wilhelm @ 2021-12-12 9:32 ` Eli Zaretskii 2021-12-12 15:48 ` H. Dieter Wilhelm 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-12 9:32 UTC (permalink / raw) To: H. Dieter Wilhelm; +Cc: stefan, emacs-devel > From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> > Date: Sun, 12 Dec 2021 10:20:49 +0100 > Cc: emacs-devel@gnu.org > > when using the TeX input method with > > GNU Emacs 28.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-12-08 > > I'm getting for "ConsonantUnderscoreConsontant" examples this > > eₑ mₘ sₛ. > > But for the MingGW build it looks strange, please consider the attached > images. (The image was done with 28.0.69, but it looks strange for > 28.0.90 as well.) You probably don't have a font installed for these subscript characters. I suggest to install Symbola. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-12 9:32 ` Eli Zaretskii @ 2021-12-12 15:48 ` H. Dieter Wilhelm 2021-12-12 16:03 ` Eli Zaretskii 0 siblings, 1 reply; 65+ messages in thread From: H. Dieter Wilhelm @ 2021-12-12 15:48 UTC (permalink / raw) To: Eli Zaretskii; +Cc: stefan, emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> >> Date: Sun, 12 Dec 2021 10:20:49 +0100 >> Cc: emacs-devel@gnu.org >> >> when using the TeX input method with >> >> GNU Emacs 28.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-12-08 >> >> I'm getting for "ConsonantUnderscoreConsontant" examples this >> >> eₑ mₘ sₛ. >> >> But for the MingGW build it looks strange, please consider the attached >> images. (The image was done with 28.0.69, but it looks strange for >> 28.0.90 as well.) > > You probably don't have a font installed for these subscript > characters. I suggest to install Symbola. Thank you for the prompt answer. Unfortunately installing the Symbola font is only a partial solution because it's not working for all the underscore patterns: GNU Emacs 28.0.90 (build 1, x86_64-w64-mingw32) of 2021-12-11 Installed Symbola (Regular) aₐ b_b c_c d_d eₑ f_f g_g hₕ iᵢ jⱼ kₖ lₘ nₙ oₒ pₚ q_q rᵣ sₛ tₜ uᵤ vᵥ w_w xₓ y_y z_z And the same appears on GNU Emacs 28.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-12-08 Dieter -- Best wishes H. Dieter Wilhelm Zwingenberg, Germany ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-12 15:48 ` H. Dieter Wilhelm @ 2021-12-12 16:03 ` Eli Zaretskii 2021-12-12 17:25 ` H. Dieter Wilhelm 0 siblings, 1 reply; 65+ messages in thread From: Eli Zaretskii @ 2021-12-12 16:03 UTC (permalink / raw) To: H. Dieter Wilhelm; +Cc: stefan, emacs-devel > From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> > Cc: stefan@marxist.se, emacs-devel@gnu.org > Date: Sun, 12 Dec 2021 16:48:12 +0100 > > >> eₑ mₘ sₛ. > >> > >> But for the MingGW build it looks strange, please consider the attached > >> images. (The image was done with 28.0.69, but it looks strange for > >> 28.0.90 as well.) > > > > You probably don't have a font installed for these subscript > > characters. I suggest to install Symbola. > > Thank you for the prompt answer. Unfortunately installing the Symbola > font is only a partial solution because it's not working for all the > underscore patterns: You never said what codepoints you want to display, just gave a small sample. Anyway, the solution is to install a font that supports them, or maybe find a font that you already have which will do. There's nothing magic here. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-12 16:03 ` Eli Zaretskii @ 2021-12-12 17:25 ` H. Dieter Wilhelm 2021-12-12 18:22 ` Eli Zaretskii 2021-12-12 19:20 ` Stefan Monnier 0 siblings, 2 replies; 65+ messages in thread From: H. Dieter Wilhelm @ 2021-12-12 17:25 UTC (permalink / raw) To: Eli Zaretskii; +Cc: stefan, emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> >> Cc: stefan@marxist.se, emacs-devel@gnu.org >> Date: Sun, 12 Dec 2021 16:48:12 +0100 >> >> >> eₑ mₘ sₛ. >> >> >> >> But for the MingGW build it looks strange, please consider the attached >> >> images. (The image was done with 28.0.69, but it looks strange for >> >> 28.0.90 as well.) >> > >> > You probably don't have a font installed for these subscript >> > characters. I suggest to install Symbola. >> >> Thank you for the prompt answer. Unfortunately installing the Symbola >> font is only a partial solution because it's not working for all the >> underscore patterns: > > You never said what codepoints you want to display, just gave a small > sample. I'm sorry, I thought this would be "obvious" because I know nearly nothing about encodings and fonts. > Anyway, the solution is to install a font that supports them, or maybe > find a font that you already have which will do. There's nothing > magic here. Please consider the abbreviated description of the input method: TeX (mode line indicator:\) LaTeX-like input method for many characters. These characters are from the charsets used by the ‘utf-8’ coding system, including many technical ones. Examples: \'a -> á \`{a} -> à \pi -> π \int -> ∫ ^1 -> ¹ KEY SEQUENCE ------------ You can input characters by the following key sequences: key char [type a key sequence to insert the corresponding character] --- ---- ----- ---- ------- ---- ------------------------------------------- ---- ... _a ₐ \"{W} Ẅ ^\phi ᶲ \multimap ⊸ _e ₑ \"{X} Ẍ ^{SM} ℠ \parallel ∥ _h ₕ \"{Y} Ÿ ^{TM} ™ \pppprime ⁗ _i ᵢ \"{a} ä $\div$ ÷ \precnsim ⋨ _j ⱼ \"{e} ë \'{\O} Ǿ \setminus ∖ _k ₖ \"{h} ḧ \'{\o} ǿ \shortmid ∣ _l ₗ \"{i} ï \={\i} ī \spesmilo ₷ _m ₘ \"{o} ö \Alpha Α \sqsubset ⊏ _n ₙ \"{t} ẗ \Delta Δ \sqsupset ⊐ _o ₒ \"{u} ü \Gamma Γ \subseteq ⊆ _p ₚ \"{w} ẅ \Kappa Κ \succnsim ⋩ _r ᵣ \"{x} ẍ \Koppa Ϟ \supseteq ⊇ _s ₛ \"{y} ÿ \Lamda Λ \textbaht ฿ _t ₜ \'\.S Ṥ \Omega Ω \textdied ✝ _u ᵤ \'\.s ṥ \Sampi Ϡ \textlira ₤ _v ᵥ \'\AE Ǽ \Shima Ϭ \textpeso ₱ _x ₓ \'\ae ǽ \Sigma Σ \thicksim ∼ --- — \'{A} Á \Theta Θ \triangle ▵ ... It seems to me that the input method is just lacking some "descriptions", would you agree? And can one mitigate this or is there a compulsory reason why, for the underscore, b,c,d,f,g,q,w,y,z were left out? Thank you for your interest. Dieter -- Best wishes H. Dieter Wilhelm Zwingenberg, Germany ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-12 17:25 ` H. Dieter Wilhelm @ 2021-12-12 18:22 ` Eli Zaretskii 2021-12-12 19:20 ` Stefan Monnier 1 sibling, 0 replies; 65+ messages in thread From: Eli Zaretskii @ 2021-12-12 18:22 UTC (permalink / raw) To: H. Dieter Wilhelm; +Cc: stefan, emacs-devel > From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> > Cc: stefan@marxist.se, emacs-devel@gnu.org > Date: Sun, 12 Dec 2021 18:25:29 +0100 > > Please consider the abbreviated description of the input method: > > TeX (mode line indicator:\) > > LaTeX-like input method for many characters. > These characters are from the charsets used by the ‘utf-8’ coding > system, including many technical ones. Examples: > \'a -> á \`{a} -> à > \pi -> π \int -> ∫ ^1 -> ¹ > > KEY SEQUENCE > ------------ > You can input characters by the following key sequences: > key char [type a key sequence to insert the corresponding character] > --- ---- ----- ---- ------- ---- ------------------------------------------- ---- > ... > _a ₐ \"{W} Ẅ ^\phi ᶲ \multimap ⊸ > _e ₑ \"{X} Ẍ ^{SM} ℠ \parallel ∥ > _h ₕ \"{Y} Ÿ ^{TM} ™ \pppprime ⁗ > _i ᵢ \"{a} ä $\div$ ÷ \precnsim ⋨ > _j ⱼ \"{e} ë \'{\O} Ǿ \setminus ∖ > _k ₖ \"{h} ḧ \'{\o} ǿ \shortmid ∣ > _l ₗ \"{i} ï \={\i} ī \spesmilo ₷ > _m ₘ \"{o} ö \Alpha Α \sqsubset ⊏ > _n ₙ \"{t} ẗ \Delta Δ \sqsupset ⊐ > _o ₒ \"{u} ü \Gamma Γ \subseteq ⊆ > _p ₚ \"{w} ẅ \Kappa Κ \succnsim ⋩ > _r ᵣ \"{x} ẍ \Koppa Ϟ \supseteq ⊇ > _s ₛ \"{y} ÿ \Lamda Λ \textbaht ฿ > _t ₜ \'\.S Ṥ \Omega Ω \textdied ✝ > _u ᵤ \'\.s ṥ \Sampi Ϡ \textlira ₤ > _v ᵥ \'\AE Ǽ \Shima Ϭ \textpeso ₱ > _x ₓ \'\ae ǽ \Sigma Σ \thicksim ∼ > --- — \'{A} Á \Theta Θ \triangle ▵ > ... > > It seems to me that the input method is just lacking some > "descriptions", would you agree? Which ones are missing? I'm afraid I'm not following you. > And can one mitigate this or is there a compulsory reason why, for > the underscore, b,c,d,f,g,q,w,y,z were left out? I don't know, sorry. ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out 2021-12-12 17:25 ` H. Dieter Wilhelm 2021-12-12 18:22 ` Eli Zaretskii @ 2021-12-12 19:20 ` Stefan Monnier 2021-12-12 21:44 ` TeX input method lacking subscript characters, was: Re: MingGW: Bug in TeX input-method? H. Dieter Wilhelm 1 sibling, 1 reply; 65+ messages in thread From: Stefan Monnier @ 2021-12-12 19:20 UTC (permalink / raw) To: H. Dieter Wilhelm; +Cc: Eli Zaretskii, stefan, emacs-devel > And can one mitigate this or is there a compulsory reason why, for the > underscore, b,c,d,f,g,q,w,y,z were left out? IIRC this part of the TeX input method is auto-generated from the Unicode tables, so if it's not there it's presumably because it's absent from Unicode. Why that is, I don't know. Stefan ^ permalink raw reply [flat|nested] 65+ messages in thread
* TeX input method lacking subscript characters, was: Re: MingGW: Bug in TeX input-method? 2021-12-12 19:20 ` Stefan Monnier @ 2021-12-12 21:44 ` H. Dieter Wilhelm 2021-12-12 23:00 ` Stephen Berman 0 siblings, 1 reply; 65+ messages in thread From: H. Dieter Wilhelm @ 2021-12-12 21:44 UTC (permalink / raw) To: Stefan Monnier; +Cc: Eli Zaretskii, stefan, emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: >> And can one mitigate this or is there a compulsory reason why, for the >> underscore, b,c,d,f,g,q,w,y,z were left out? > > IIRC this part of the TeX input method is auto-generated from the > Unicode tables, so if it's not there it's presumably because it's absent > from Unicode. Why that is, I don't know. Yes, it seems so. I checked the unicode standard version 14.0 superscript and subscript character code table. And - indeed - below subscripts aren't described. b_b, c_c, d_d, f_f, g_g, q_q, w_w, y_y, z_z but when I'm putting above sequence in an org-mode buffer and typing M-x org-toogle-pretty-entities it seems that org-mode manages to display these unicode subscripts! And it works for me on Windows and Gnu-Linux. Dieter -- Best wishes H. Dieter Wilhelm Zwingenberg, Germany ^ permalink raw reply [flat|nested] 65+ messages in thread
* Re: TeX input method lacking subscript characters, was: Re: MingGW: Bug in TeX input-method? 2021-12-12 21:44 ` TeX input method lacking subscript characters, was: Re: MingGW: Bug in TeX input-method? H. Dieter Wilhelm @ 2021-12-12 23:00 ` Stephen Berman 0 siblings, 0 replies; 65+ messages in thread From: Stephen Berman @ 2021-12-12 23:00 UTC (permalink / raw) To: H. Dieter Wilhelm; +Cc: Eli Zaretskii, stefan, Stefan Monnier, emacs-devel On Sun, 12 Dec 2021 22:44:24 +0100 "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> wrote: > Stefan Monnier <monnier@iro.umontreal.ca> writes: > >>> And can one mitigate this or is there a compulsory reason why, for the >>> underscore, b,c,d,f,g,q,w,y,z were left out? >> >> IIRC this part of the TeX input method is auto-generated from the >> Unicode tables, so if it's not there it's presumably because it's absent >> from Unicode. Why that is, I don't know. > > Yes, it seems so. I checked the unicode standard version 14.0 > superscript and subscript character code table. And - indeed - below > subscripts aren't described. > > b_b, c_c, d_d, f_f, g_g, q_q, w_w, y_y, z_z > > but when I'm putting above sequence in an org-mode buffer and typing M-x > org-toogle-pretty-entities it seems that org-mode manages to display > these unicode subscripts! And it works for me on Windows and Gnu-Linux. Org mode uses text properties (display, invisible) to do that, see `org-raise-scripts' in org.el. Steve Berman ^ permalink raw reply [flat|nested] 65+ messages in thread
end of thread, other threads:[~2021-12-12 23:00 UTC | newest] Thread overview: 65+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-02 22:41 Emacs pretest 28.0.90 is out Stefan Kangas 2021-12-05 3:38 ` Po Lu 2021-12-05 8:00 ` Eli Zaretskii 2021-12-05 10:34 ` Po Lu 2021-12-05 10:59 ` Eli Zaretskii 2021-12-05 11:18 ` Po Lu 2021-12-05 11:24 ` Eli Zaretskii 2021-12-05 11:30 ` Po Lu 2021-12-05 13:48 ` Eli Zaretskii 2021-12-06 0:53 ` Po Lu 2021-12-06 12:49 ` Eli Zaretskii 2021-12-06 13:26 ` Po Lu 2021-12-06 13:41 ` Po Lu 2021-12-06 14:05 ` Eli Zaretskii 2021-12-07 0:42 ` Po Lu 2021-12-07 2:16 ` Po Lu 2021-12-07 13:40 ` Eli Zaretskii 2021-12-08 1:02 ` Po Lu 2021-12-08 12:37 ` Eli Zaretskii 2021-12-08 13:26 ` Po Lu 2021-12-08 13:36 ` Eli Zaretskii 2021-12-09 2:10 ` Po Lu 2021-12-09 9:16 ` Eli Zaretskii 2021-12-09 10:31 ` Po Lu 2021-12-09 10:41 ` Eli Zaretskii 2021-12-09 11:00 ` Po Lu 2021-12-09 12:16 ` Eli Zaretskii 2021-12-09 12:42 ` Po Lu 2021-12-09 12:43 ` Eli Zaretskii 2021-12-09 12:49 ` Po Lu 2021-12-09 12:56 ` Po Lu 2021-12-09 13:08 ` Eli Zaretskii 2021-12-09 13:18 ` Po Lu 2021-12-09 13:40 ` Eli Zaretskii 2021-12-09 13:42 ` Eli Zaretskii 2021-12-09 13:50 ` Po Lu 2021-12-09 13:47 ` Po Lu 2021-12-09 14:07 ` Eli Zaretskii 2021-12-09 14:24 ` Eli Zaretskii 2021-12-09 14:33 ` Eli Zaretskii 2021-12-09 14:44 ` Eli Zaretskii 2021-12-10 0:23 ` Po Lu 2021-12-10 0:44 ` Po Lu 2021-12-10 8:36 ` Eli Zaretskii 2021-12-10 9:35 ` Po Lu 2021-12-10 13:44 ` Po Lu via Emacs development discussions. 2021-12-10 14:26 ` Eli Zaretskii 2021-12-11 1:06 ` Po Lu 2021-12-11 8:08 ` Eli Zaretskii 2021-12-11 9:42 ` Po Lu via Emacs development discussions. 2021-12-11 11:23 ` Eli Zaretskii 2021-12-11 11:51 ` Po Lu 2021-12-06 13:55 ` Eli Zaretskii 2021-12-05 3:42 ` David O'Toole 2021-12-05 9:34 ` H. Dieter Wilhelm 2021-12-09 1:31 ` pretest installed (was: Emacs pretest 28.0.90 is out) andrés ramírez 2021-12-12 9:20 ` MingGW: Bug in TeX input-method?, was: Re: Emacs pretest 28.0.90 is out H. Dieter Wilhelm 2021-12-12 9:32 ` Eli Zaretskii 2021-12-12 15:48 ` H. Dieter Wilhelm 2021-12-12 16:03 ` Eli Zaretskii 2021-12-12 17:25 ` H. Dieter Wilhelm 2021-12-12 18:22 ` Eli Zaretskii 2021-12-12 19:20 ` Stefan Monnier 2021-12-12 21:44 ` TeX input method lacking subscript characters, was: Re: MingGW: Bug in TeX input-method? H. Dieter Wilhelm 2021-12-12 23:00 ` Stephen Berman
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.