beagleboard / am335x_pru_package

332 stars 181 forks source link

pasm: Replace missing directory separator in `#include` for POSIX #54

Closed zultron closed 7 years ago

zultron commented 8 years ago

Commit be231a82 fixed included files for Windows, but broke POSIX. The POSIX dirname() removes a trailing /, but the Windows equivalents do not.

Commit 731fab64 attempted to fix this by removing the trailing slash, but broken pointer arithmetic ended up having no effect in almost every case.

This commit attempts to fix the last fix, and then adds the / back into the path at the correct place. It also fixes cosmetic cases where the included file is in the same directory, and the leading ./ may be omitted.

Fixes #53

cdsteinkuehler commented 8 years ago

Thanks John! It looks like this fixes things (or at least the *.dbg filenames look correct...I'm not setup right now to launch the debugger for a real test.

zultron commented 8 years ago

@cdsteinkuehler Great, your fix is the one on line 622 of pasm.c.

A Windows user will need to test to see whether the path_utils.c changes break anything.