Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crnlib/crn_file_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,23 +347,23 @@ bool file_utils::full_path(dynamic_string& path) {
if (!p)
return false;
#else
char buf[PATH_MAX];
char* p;
char* p = nullptr;
dynamic_string pn, fn;
split_path(path.get_ptr(), pn, fn);
if ((fn == ".") || (fn == "..")) {
p = realpath(path.get_ptr(), buf);
p = realpath(path.get_ptr(), NULL);
if (!p)
return false;
path.set(buf);
path.set(p);
} else {
if (pn.is_empty())
pn = "./";
p = realpath(pn.get_ptr(), buf);
p = realpath(pn.get_ptr(), NULL);
if (!p)
return false;
combine_path(path, buf, fn.get_ptr());
combine_path(path, p, fn.get_ptr());
}
free(p);
#endif

return true;
Expand Down
3 changes: 1 addition & 2 deletions crnlib/crn_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "crn_timer.h"
#include <time.h>

#if defined(__FreeBSD__)
#if !defined(CRNLIB_USE_WIN32_API)
#include "sys/time.h"
#endif

Expand All @@ -27,7 +27,6 @@ inline void query_counter_frequency(timer_ticks* pTicks) {
QueryPerformanceFrequency(reinterpret_cast<LARGE_INTEGER*>(pTicks));
}
#elif defined(__GNUC__)
#include <sys/timex.h>
inline void query_counter(timer_ticks* pTicks) {
struct timeval cur_time;
gettimeofday(&cur_time, NULL);
Expand Down
Loading