unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40205: 32bit or LTO movemail build fails on macOS
  2020-03-24  3:14 bug#40205: 28.0.50; " YAMAMOTO Mitsuharu
@ 2020-03-25  2:58 ` Paul Eggert
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggert @ 2020-03-25  2:58 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: Zack Weinberg, Gnulib bugs, 40205

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix the 
bug for you?

I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For those 
new to this thread, please see <https://bugs.gnu.org/40205>.

[-- Attachment #2: getopt-apple.diff --]
[-- Type: text/x-patch, Size: 771 bytes --]

diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h
index 31a747d67..a4891bc80 100644
--- a/lib/getopt-pfx-core.h
+++ b/lib/getopt-pfx-core.h
@@ -48,6 +48,14 @@
 # define optind __GETOPT_ID (optind)
 # define optopt __GETOPT_ID (optopt)
 
+/* Work around a a problem on macOS, which declares getopt with a
+   trailing __DARWIN_ALIAS(getopt) that would expand to something like
+   __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following
+   hack to suppress the macOS declaration <https://bugs.gnu.org/40205>.  */
+# ifdef __APPLE__
+#  define _GETOPT
+# endif
+
 /* The system's getopt.h may have already included getopt-core.h to
    declare the unprefixed identifiers.  Undef _GETOPT_CORE_H so that
    getopt-core.h declares them with prefixes.  */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#40205: 32bit or LTO movemail build fails on macOS
       [not found] <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu>
@ 2020-03-25  4:07 ` YAMAMOTO Mitsuharu
  2020-03-25 20:43   ` Paul Eggert
  2020-03-25 13:14 ` Zack Weinberg
  1 sibling, 1 reply; 4+ messages in thread
From: YAMAMOTO Mitsuharu @ 2020-03-25  4:07 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Zack Weinberg, Gnulib bugs, 40205

On Wed, 25 Mar 2020 11:58:19 +0900,
Paul Eggert wrote:
> 
> Thanks for the bug report. Does the attached patch to
> getopt-pfx-core.h fix the bug for you?

Yes, this works for both -arch i386 and -flto cases.  Thanks.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#40205: 32bit or LTO movemail build fails on macOS
       [not found] <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu>
  2020-03-25  4:07 ` bug#40205: 32bit or LTO movemail build fails on macOS YAMAMOTO Mitsuharu
@ 2020-03-25 13:14 ` Zack Weinberg
  1 sibling, 0 replies; 4+ messages in thread
From: Zack Weinberg @ 2020-03-25 13:14 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 40205, Gnulib bugs

On Tue, Mar 24, 2020 at 10:58 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix the
> bug for you?
>
> I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For those
> new to this thread, please see <https://bugs.gnu.org/40205>.

Patch seems plausible enough to me.  I didn't think very hard about
the ways a system declaration of getopt could interfere when I wrote
this file.

zw





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#40205: 32bit or LTO movemail build fails on macOS
  2020-03-25  4:07 ` bug#40205: 32bit or LTO movemail build fails on macOS YAMAMOTO Mitsuharu
@ 2020-03-25 20:43   ` Paul Eggert
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggert @ 2020-03-25 20:43 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: Zack Weinberg, 40205-done, Gnulib bugs

On 3/24/20 9:07 PM, YAMAMOTO Mitsuharu wrote:

> Yes, this works for both -arch i386 and -flto cases.

Thanks for checking. I installed the patch into Gnulib and propagated the fix 
into Emacs master, and am marking this Emacs bug as done.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-25 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu>
2020-03-25  4:07 ` bug#40205: 32bit or LTO movemail build fails on macOS YAMAMOTO Mitsuharu
2020-03-25 20:43   ` Paul Eggert
2020-03-25 13:14 ` Zack Weinberg
2020-03-24  3:14 bug#40205: 28.0.50; " YAMAMOTO Mitsuharu
2020-03-25  2:58 ` bug#40205: " Paul Eggert

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).