Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac support #5

Merged
merged 13 commits into from
Dec 27, 2024
Merged

Mac support #5

merged 13 commits into from
Dec 27, 2024

Conversation

Alto1772
Copy link
Contributor

@Alto1772 Alto1772 commented Dec 4, 2023

One more thing in this change, I've moved CFLAGS from make onto the ./configure at execution. Y'know what? Scratch that...
This might require rigorous testing I hope... Fixes #1

@cadmic
Copy link
Contributor

cadmic commented Dec 25, 2024

I tried this locally and I needed this patch:

--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -76,9 +76,15 @@ static unsigned int lineno_stack[MAX_INCLUDE_DEPTH];
 static unsigned int include_stack_ptr = 0;
 static int vers_node_nesting = 0;

+#ifdef DARWIN
+#define YY_SIZE_T yy_size_t
+#else
+#define YY_SIZE_T int
+#endif
+
 static YY_BUFFER_STATE yy_create_string_buffer PARAMS ((const char *string,
                                                        size_t size));
-static void yy_input PARAMS ((char *, int *result, int max_size));
+static void yy_input PARAMS ((char *, YY_SIZE_T *result, int max_size));

 static void comment PARAMS ((void));
 static void lex_warn_invalid PARAMS ((char *where, char *what));
@@ -581,7 +587,7 @@ ldlex_popstate ()
 static void
 yy_input (buf, result, max_size)
      char *buf;
-     int *result;
+     YY_SIZE_T *result;
      int max_size;
 {
   *result = 0;

Otherwise things went smoothly, I tested on the ultralib iQue branch and it seemed to work

Copy link
Collaborator

@AngheloAlf AngheloAlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another nit besides the patch posted by cadmic

Comment on lines 463 to 464
#else
#ifdef DARWIN
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#else
#ifdef DARWIN
#elif defined(DARWIN)

Would remove the need for an extra trailing #endif

@AngheloAlf AngheloAlf merged commit eef86b0 into decompals:master Dec 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mac support
3 participants