unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Corcoles <alex@corcoles.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Interest in a Cosmopolitan build?
Date: Wed, 08 Nov 2023 21:11:51 +0100	[thread overview]
Message-ID: <784ffc8ae66e600ffbc598232cbc1abea9e55788.camel@corcoles.net> (raw)
In-Reply-To: <83ttpw1lzw.fsf@gnu.org>

Hi,


> Can you post the patches here?  I'd prefer not to point people to
> GitHub.

Not sure if this will come out OK:

8< 8< 8< 8< 8< 8< 8< 8< 8< 8<
--- ./emacs-29.1/src/config.in	2023-07-23 09:58:50.000000000 +0200
+++ ./emacs-29.1/src/config.in.new	2023-11-05 10:42:18.274387041
+0100
@@ -1790,7 +1790,7 @@
 #undef INTERNAL_TERMINAL
 
 /* Define to read input using SIGIO. */
-#undef INTERRUPT_INPUT
+#undef INTERRUPT_INPUT0
 
 /* Returns true if character is any form of separator. */
 #undef IS_ANY_SEP
@@ -2094,7 +2094,7 @@
 #undef UNIX98_PTYS
 
 /* Define to 1 if FIONREAD is usable. */
-#undef USABLE_FIONREAD
+#undef USABLE_FIONREAD0
 
 /* Define to 1 if SIGIO is usable. */
 #undef USABLE_SIGIO

--- ./emacs-29.1/src/filelock.c	2023-01-01 14:46:43.000000000 +0100
+++ ./emacs-29.1/src/filelock.c.new	2023-11-04 17:53:19.163803983
+0100
@@ -298,7 +298,7 @@
    There is no way to tell whether a symlink call fails due to
    permissions issues or because links are not supported, but luckily
    the lock file code should work either way.  */
-enum { LINKS_MIGHT_NOT_WORK = EPERM };
+#define LINKS_MIGHT_NOT_WORK EPERM
 
 /* Rename OLD to NEW.  If FORCE, replace any existing NEW.
    It is OK if there are temporarily two hard links to OLD.
@@ -498,17 +498,14 @@
 
 /* True if errno values are negative.  Although the C standard
    requires them to be positive, they are negative in Haiku.  */
-enum { NEGATIVE_ERRNO = EDOM < 0 };
+#define NEGATIVE_ERRNO (EDOM < 0)
 
 /* Nonzero values that are not errno values.  */
-enum
-  {
-    /* Another process on this machine owns it.  */
-    ANOTHER_OWNS_IT = NEGATIVE_ERRNO ? 1 : -1,
-
-    /* This Emacs process owns it.  */
-    I_OWN_IT = 2 * ANOTHER_OWNS_IT
-  };
+/* Another process on this machine owns it.  */
+#define ANOTHER_OWNS_IT (NEGATIVE_ERRNO ? 1 : -1)
+
+/* This Emacs process owns it.  */
+#define I_OWN_IT (2 * ANOTHER_OWNS_IT)
 
 /* Return 0 if nobody owns the lock file LFNAME or the lock is
obsolete,
    ANOTHER_OWNS_IT if another process owns it
8< 8< 8< 8< 8< 8< 8< 8< 8< 8<

The undef's I think clearly need to be solved in Cosmopolitan. The
enums... I'm not so sure.

Cheers,

Álex





  parent reply	other threads:[~2023-11-08 20:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 21:23 Interest in a Cosmopolitan build? Alex Corcoles
2023-11-08  9:38 ` Emanuel Berg
2023-11-08 12:13 ` Eli Zaretskii
2023-11-08 14:54   ` Björn Bidar
2023-11-08 20:11   ` Alex Corcoles [this message]
2023-11-09  0:00     ` Po Lu
2023-11-09  5:44     ` Eli Zaretskii
2023-11-09  8:32       ` Po Lu
2023-11-09  8:47         ` Eli Zaretskii
2023-11-09 11:02           ` Alex Corcoles
2023-11-09  2:34 ` Richard Stallman
2023-11-09 10:56   ` Alex Corcoles
     [not found] <mailman.37.1699462824.25818.emacs-devel@gnu.org>
2023-11-08 20:16 ` Alex Corcoles
2023-11-10  2:52   ` Richard Stallman
2023-11-10 10:10     ` Alex Corcoles

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=784ffc8ae66e600ffbc598232cbc1abea9e55788.camel@corcoles.net \
    --to=alex@corcoles.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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).