You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yorickpeterse opened this issue
Aug 29, 2024
· 0 comments
Labels
compilerChanges related to the compilerfeatureNew things to add to Inko, such as a new standard library modulestdChanges related to the standard library
macOS and FreeBSD may include non-standard symbols in function names, such as opendir$INODE64() or fstat@FBSD_1.5 for FreeBSD (see here). Currently we allow dollars in the name so we can handle the former, but we don't handle the case of FreeBSD.
Instead of changing the syntax to allow these special symbols, a better name would be to specify the link name in addition to the call name. A hypothetical syntax would be this:
fn extern opendir as 'opendir$INODE64'(path: Pointer[UInt8]) -> Pointer[UInt8]
Here the as ... bit would specify the name to link the symbol as. The quotes are needed/used so any symbol can be used in the link name. Another option is to flip it around:
fn extern 'opendir$INODE64' as opendir(path: Pointer[UInt8]) -> Pointer[UInt8]
This looks a little less odd, though I'm still not entirely sure about it.
Related work
No response
The text was updated successfully, but these errors were encountered:
yorickpeterse
added
feature
New things to add to Inko, such as a new standard library module
compiler
Changes related to the compiler
std
Changes related to the standard library
labels
Aug 29, 2024
compilerChanges related to the compilerfeatureNew things to add to Inko, such as a new standard library modulestdChanges related to the standard library
Description
macOS and FreeBSD may include non-standard symbols in function names, such as
opendir$INODE64()
orfstat@FBSD_1.5
for FreeBSD (see here). Currently we allow dollars in the name so we can handle the former, but we don't handle the case of FreeBSD.Instead of changing the syntax to allow these special symbols, a better name would be to specify the link name in addition to the call name. A hypothetical syntax would be this:
Here the
as ...
bit would specify the name to link the symbol as. The quotes are needed/used so any symbol can be used in the link name. Another option is to flip it around:This looks a little less odd, though I'm still not entirely sure about it.
Related work
No response
The text was updated successfully, but these errors were encountered: