From 66618ec9909ceb03ca8e284c945fbbabe7708c20 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Fri, 30 Jun 2017 21:36:51 -0400 Subject: [PATCH] trying to get PATH_MAX --- platform_linux/linux_4ed_file_track.cpp | 9 +++++---- platform_mac/mac_4ed.cpp | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/platform_linux/linux_4ed_file_track.cpp b/platform_linux/linux_4ed_file_track.cpp index 348aaff4..1859224b 100644 --- a/platform_linux/linux_4ed_file_track.cpp +++ b/platform_linux/linux_4ed_file_track.cpp @@ -184,11 +184,12 @@ expand_track_system_listeners(File_Track_System *system, Partition *scratch, voi // NOTE(inso): assuming PATH_MAX is a reasonable lower bound of extra memory to get - if(size < PATH_MAX){ + if (size < PATH_MAX){ result = FileTrack_MemoryTooSmall; - } else { - vars->string_mem_begin = (char*) mem; - vars->string_mem_end = (char*) mem + size;; + } + else{ + vars->string_mem_begin = (char*)mem; + vars->string_mem_end = (char*)mem + size;; } pthread_mutex_unlock(&vars->lock); diff --git a/platform_mac/mac_4ed.cpp b/platform_mac/mac_4ed.cpp index 8c90e5df..9db609e1 100644 --- a/platform_mac/mac_4ed.cpp +++ b/platform_mac/mac_4ed.cpp @@ -43,6 +43,8 @@ #include "4ed_font_interface_to_os.h" #include "4ed_system_shared.h" +#include + #include "unix_4ed_functions.cpp" #include "osx_objective_c_to_cpp_links.h"