os: use _dyld_get_image_name() to increase compatibility with older versions of Mac OS X#26617
Conversation
older versions of Mac OS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1737c86493
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I am currently seeing this error: According to https://docs.vlang.io/v-and-c.html it mentions how to handle this issue: "Note also the second parameter const char *format, which was redeclared as const_format &char . The const_ prefix in that redeclaration may seem arbitrary, but it is important, if you want to compile your code with -cstrict or thirdparty C static analysis tools. V currently does not have another way to express that this parameter is a const (this will probably change in V 1.0)." I am pretty sure I followed the rules. Does anyone have a suggestion on how to fix this issue? |
|
Thank you for the help spytheman. Is it ok to change 'charptr' back to '&char'? I only made the change to see if I could fix the problem I was having. The change did not work. |
…ersions of Mac OS X like 10.4 (vlang#26617)
The libproc.h header is not available on Mac OS 10.4 and older. It prevents V from being built on these operating systems. The solution is to replace the functions from libproc.h with the function _dyld_get_image_name() to get the path of the program.