Skip to content

Commit

Permalink
DynaLoader: dl_dyld.xs: don't undef bool
Browse files Browse the repository at this point in the history
I expect this was added when we added our own bool, and before
we used bool so liberally ourselves.  Now dl_dyld.xs fails to
compile, since MY_CXT_CLONE indirectly uses UNLIKELY() which
casts to bool.

Tested locally with:

  ./Configure -des -Dusedevel -Dusethreads -Ddlsrc=dl_dyld.xs

on a modern Darwin, which failed before this change and builds
after.

Based on work done by Sevan Janiyan in Perl#21751.

Fixes Perl#21751
  • Loading branch information
tonycoz committed Jan 10, 2024
1 parent aed1f3d commit 7995cc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion ext/DynaLoader/DynaLoader_pm.PL
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ package DynaLoader;
# [email protected], August 1994
BEGIN {
our $VERSION = '1.54';
our $VERSION = '1.55';
}
# Note: in almost any other piece of code "our" would have been a better
Expand Down
1 change: 0 additions & 1 deletion ext/DynaLoader/dl_dyld.xs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ been tested on NeXT platforms.
#include "dlutils.c" /* for SaveError() etc */

#undef environ
#undef bool
#import <mach-o/dyld.h>

static char *dlerror()
Expand Down

0 comments on commit 7995cc1

Please sign in to comment.