There's no _fullpath function in Unix, but there's the very similar realpath:
Declare Library
Function realpath%& (path$, buf$)
End Declare
Print expandpath$("untitled.bas")
Function expandpath$ (relpath$)
buf$ = String$(4096, Chr$(0)) 'PATH_MAX
r%& = realpath%&(relpath$ + Chr$(0), buf$)
If r%& = 0 Then
expandpath$ = ""
Else
expandpath$ = Left$(buf$, InStr(buf$, Chr$(0)) - 1)
End If
End Function
I've hardcoded the output buffer size as 4096 which is PATH_MAX on my current Linux, but that's pretty dodgy. A better way to do things would be to pass NULL for the second argument, then realpath returns a pointer to a malloc'd buffer that you can call free on.
I didn't do that because copying the data from the buffer into a QB64 string turns out to be rather annoying, so you get the hacky version for now.