Skip to content

Update VA_COPY macro to use va_copy function#3

Open
programmer-1101 wants to merge 2 commits intooffscale:masterfrom
programmer-1101:master
Open

Update VA_COPY macro to use va_copy function#3
programmer-1101 wants to merge 2 commits intooffscale:masterfrom
programmer-1101:master

Conversation

@programmer-1101
Copy link
Copy Markdown

Edit c89stringutils_string_extras.c for C89 compliance.

Key Changes:

  • Variable Scoping: Moved all local variable declarations to the beginning of functional blocks to satisfy C89 requirements.
  • VA_COPY Portability: Implemented a memcpy-based fallback for VA_COPY.
    This resolves build failures on architectures (like x86_64 and PowerPC)
    where va_list is an array type and cannot be assigned using '='.
  • CI Infrastructure: Updated Cirrus CI FreeBSD image to 14

va_list isn't guarenteed to be a simple assignable type. In the case it's not #define VA_COPY(dest, src) (dest) = (src) produces undefined behaviour
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.

1 participant