Use PATH_MAX for MAX_OSPATH on all platforms

The hardcoded 256 doesn't cut it.
This commit is contained in:
dhewg 2012-07-03 17:34:19 +02:00
parent f000947d4e
commit 99864667a7
3 changed files with 5 additions and 5 deletions

View file

@ -29,6 +29,8 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __FILESYSTEM_H__ #ifndef __FILESYSTEM_H__
#define __FILESYSTEM_H__ #define __FILESYSTEM_H__
#include <limits.h>
#include "idlib/containers/StrList.h" #include "idlib/containers/StrList.h"
#include "framework/File.h" #include "framework/File.h"
@ -55,9 +57,9 @@ If you have questions concerning this license or the applicable additional terms
=============================================================================== ===============================================================================
*/ */
static const ID_TIME_T FILE_NOT_FOUND_TIMESTAMP = 0xFFFFFFFF; static const ID_TIME_T FILE_NOT_FOUND_TIMESTAMP = 0xFFFFFFFF;
static const int MAX_PURE_PAKS = 128; static const int MAX_PURE_PAKS = 128;
static const int MAX_OSPATH = 256; static const int MAX_OSPATH = PATH_MAX;
// modes for OpenFileByMode. used as bit mask internally // modes for OpenFileByMode. used as bit mask internally
typedef enum { typedef enum {

View file

@ -41,13 +41,13 @@ If you have questions concerning this license or the applicable additional terms
#include "sys/platform.h" #include "sys/platform.h"
#include "idlib/containers/StrList.h" #include "idlib/containers/StrList.h"
#include "framework/FileSystem.h"
#include "framework/KeyInput.h" #include "framework/KeyInput.h"
#include "framework/EditField.h" #include "framework/EditField.h"
#include "sys/sys_local.h" #include "sys/sys_local.h"
#include "sys/posix/posix_public.h" #include "sys/posix/posix_public.h"
#define MAX_OSPATH 256
#define COMMAND_HISTORY 64 #define COMMAND_HISTORY 64
static int input_hide = 0; static int input_hide = 0;

View file

@ -46,8 +46,6 @@ If you have questions concerning this license or the applicable additional terms
#include "renderer/wglext.h" // windows OpenGL extensions #include "renderer/wglext.h" // windows OpenGL extensions
#include "sys/sys_public.h" #include "sys/sys_public.h"
#define MAX_OSPATH 256
#define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE | WS_THICKFRAME) #define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE | WS_THICKFRAME)
void Sys_CreateConsole( void ); void Sys_CreateConsole( void );