Cleaning up build on gcc

This commit is contained in:
Michael Tryby
2019-04-03 09:27:51 -04:00
parent 8b35866b69
commit 207cc53b04
5 changed files with 11 additions and 9 deletions

View File

@@ -58,12 +58,12 @@ void delete_file_manager(file_handle_t *file_handle) {
}
void get_filename(file_handle_t *file_handle, char **filename, size_t *size)
int get_filename(file_handle_t *file_handle, char **filename)
//
// BE AWARE: The memory allocated here must be freed by the caller
//
{
copy_cstr(file_handle->filename, filename);
return copy_cstr(file_handle->filename, filename);
}
@@ -171,7 +171,7 @@ int _fopen(FILE **f, const char *name, const char *mode)
{
int ret = 0;
#ifdef _WIN32
#ifdef _MSC_VER
ret = (int)fopen_s(f, name, mode);
#else
*f = fopen(name, mode);

View File

@@ -44,7 +44,7 @@ file_handle_t *create_file_manager();
void delete_file_manager(file_handle_t *file_handle);
void get_filename(file_handle_t *file_handle, char **filename, size_t *size);
int get_filename(file_handle_t *file_handle, char **filename);
int open_file(file_handle_t *file_handle, const char *filename, const char *file_mode);