From: Stefan Kangas <stefan@marxist.se>
To: Reuben Thomas <rrt@sc3d.org>
Cc: 18238@debbugs.gnu.org
Subject: bug#18238: Fix for DOS build when using more accurate config[.h].in
Date: Fri, 22 Oct 2021 15:02:17 -0400 [thread overview]
Message-ID: <CADwFkmmz1=ZaG_-_BE5kX8gXVRo-oAWvdjXpfFaWegmfmXhFaQ@mail.gmail.com> (raw)
In-Reply-To: <CAOnWdoiagFpg4zDyi6tbqzY-52Rx8wP+ucUHFi1YRS6HLVT3tQ@mail.gmail.com> (Reuben Thomas's message of "Sun, 10 Aug 2014 17:47:11 +0100")
Reuben Thomas <rrt@sc3d.org> writes:
> DJGPP does actually have getrlimit. The special config[.h].in for MSDOS lies and says it hasn't. However, this is a white lie, because
> getrlimit on DJGPP doesn't support RLIMIT_AS/RLIMIT_DATA, which is what we want, so we still want the workaround code. The following
> patch simply reverses the order of a couple of tests in vm-limit.c so that being on MSDOS overrides HAVE_GETRLIMIT.
>
> Is it OK to install?
(That was in 2014.)
It seems like this patch was never installed. Is it still relevant?
> === modified file 'src/vm-limit.c'
> --- src/vm-limit.c 2014-07-11 10:09:51 +0000
> +++ src/vm-limit.c 2014-08-10 16:44:24 +0000
> @@ -71,7 +71,27 @@
> /* Number of bytes of writable memory we can expect to be able to get. */
> static size_t lim_data;
>
>
> -#ifdef HAVE_GETRLIMIT
> +#ifdef MSDOS
> +
> +void
> +get_lim_data (void)
> +{
> + unsigned long totalram, freeram, totalswap, freeswap;
> +
> + dos_memory_info (&totalram, &freeram, &totalswap, &freeswap);
> + lim_data = freeram;
> + /* Don't believe they will give us more that 0.5 GB. */
> + if (lim_data > 512U * 1024U * 1024U)
> + lim_data = 512U * 1024U * 1024U;
> +}
> +
> +unsigned long
> +ret_lim_data (void)
> +{
> + get_lim_data ();
> + return lim_data;
> +}
> +#elif defined HAVE_GETRLIMIT
>
> # ifndef RLIMIT_AS
> # define RLIMIT_AS RLIMIT_DATA
> @@ -101,26 +121,6 @@
> lim_data = reserved_heap_size;
> }
>
> -#elif defined MSDOS
> -
> -void
> -get_lim_data (void)
> -{
> - unsigned long totalram, freeram, totalswap, freeswap;
> -
> - dos_memory_info (&totalram, &freeram, &totalswap, &freeswap);
> - lim_data = freeram;
> - /* Don't believe they will give us more that 0.5 GB. */
> - if (lim_data > 512U * 1024U * 1024U)
> - lim_data = 512U * 1024U * 1024U;
> -}
> -
> -unsigned long
> -ret_lim_data (void)
> -{
> - get_lim_data ();
> - return lim_data;
> -}
> #else
> # error "get_lim_data not implemented on this machine"
> #endif
next prev parent reply other threads:[~2021-10-22 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-10 16:47 bug#18238: Fix for DOS build when using more accurate config[.h].in Reuben Thomas
2014-08-10 16:52 ` Andreas Schwab
2014-08-10 16:53 ` Reuben Thomas
2014-08-10 17:59 ` Stefan Monnier
2014-08-10 18:05 ` Eli Zaretskii
2014-08-10 18:20 ` Reuben Thomas
2014-08-10 18:28 ` Eli Zaretskii
2014-08-10 19:35 ` Eli Zaretskii
2021-10-22 19:02 ` Stefan Kangas [this message]
2021-10-22 21:14 ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23 6:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmmz1=ZaG_-_BE5kX8gXVRo-oAWvdjXpfFaWegmfmXhFaQ@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=18238@debbugs.gnu.org \
--cc=rrt@sc3d.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).