bake
bake copied to clipboard
Fix amalgamate on windows
Change Log
- Fix crash caused by passing
FILE*across DLL boundaries on windows when callingut_file_readlnfrom amalgamate. To fix this I replacedfopen/fclosewithut_file_open/ut_file_closeso that bake util is the only thing interacting with theFILE*passed tout_file_readln. - Made amalgamate normalize file paths using
UT_OS_PSso they are always consistent when added tofiles_parsedand when getting the current directory from the file path on windows.
Known Bugs
- Currently bake amalgamate iterates files only using the order returned by the file system, this leads to inconsistent ordering when used on different file systems. To fix this the file paths need to be sorted so they are always processed in the same order. Because of this I've left amalgamate disabled on windows but this is likely to affect other environments as well.