Update PATH_MAX to PATH_MAX_LENGTH
This commit is contained in:
parent
215042cdbb
commit
99c9afa5cd
|
@ -217,7 +217,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
|
||||||
rarch_dsp_filter_t *rarch_dsp_filter_new(
|
rarch_dsp_filter_t *rarch_dsp_filter_new(
|
||||||
const char *filter_config, float sample_rate)
|
const char *filter_config, float sample_rate)
|
||||||
{
|
{
|
||||||
char basedir[PATH_MAX];
|
char basedir[PATH_MAX_LENGTH];
|
||||||
struct string_list *plugs = NULL;
|
struct string_list *plugs = NULL;
|
||||||
rarch_dsp_filter_t *dsp = NULL;
|
rarch_dsp_filter_t *dsp = NULL;
|
||||||
|
|
||||||
|
|
4
driver.c
4
driver.c
|
@ -587,7 +587,7 @@ static const void *find_driver_nonempty(const char *label, int i,
|
||||||
static int find_driver_index(const char * label, const char *drv)
|
static int find_driver_index(const char * label, const char *drv)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char str[PATH_MAX];
|
char str[PATH_MAX_LENGTH];
|
||||||
const void *obj = NULL;
|
const void *obj = NULL;
|
||||||
|
|
||||||
for (i = 0; (obj = (const void*)
|
for (i = 0; (obj = (const void*)
|
||||||
|
@ -1057,7 +1057,7 @@ static void adjust_system_rates(void)
|
||||||
|
|
||||||
void driver_set_monitor_refresh_rate(float hz)
|
void driver_set_monitor_refresh_rate(float hz)
|
||||||
{
|
{
|
||||||
char msg[PATH_MAX];
|
char msg[PATH_MAX_LENGTH];
|
||||||
snprintf(msg, sizeof(msg), "Setting refresh rate to: %.3f Hz.", hz);
|
snprintf(msg, sizeof(msg), "Setting refresh rate to: %.3f Hz.", hz);
|
||||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||||
RARCH_LOG("%s\n", msg);
|
RARCH_LOG("%s\n", msg);
|
||||||
|
|
|
@ -183,7 +183,7 @@ static void history_playlist_push(content_playlist_t *playlist,
|
||||||
const char *path, const char *core_path,
|
const char *path, const char *core_path,
|
||||||
struct retro_system_info *info)
|
struct retro_system_info *info)
|
||||||
{
|
{
|
||||||
char tmp[PATH_MAX];
|
char tmp[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
if (!playlist || g_extern.libretro_dummy || !info)
|
if (!playlist || g_extern.libretro_dummy || !info)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void find_first_libretro_core(char *first_file,
|
||||||
|
|
||||||
for (i = 0; i < list->size && !ret; i++)
|
for (i = 0; i < list->size && !ret; i++)
|
||||||
{
|
{
|
||||||
char fname[PATH_MAX];
|
char fname[PATH_MAX_LENGTH];
|
||||||
const char *libretro_elem = (const char*)list->elems[i].data;
|
const char *libretro_elem = (const char*)list->elems[i].data;
|
||||||
|
|
||||||
RARCH_LOG("Checking library: \"%s\".\n", libretro_elem);
|
RARCH_LOG("Checking library: \"%s\".\n", libretro_elem);
|
||||||
|
@ -87,7 +87,7 @@ static void find_and_set_first_file(char *path, size_t sizeof_path,
|
||||||
* we can find in the RetroArch cores directory.
|
* we can find in the RetroArch cores directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char first_file[PATH_MAX] = {0};
|
char first_file[PATH_MAX_LENGTH] = {0};
|
||||||
find_first_libretro_core(first_file, sizeof(first_file),
|
find_first_libretro_core(first_file, sizeof(first_file),
|
||||||
g_defaults.core_dir, ext);
|
g_defaults.core_dir, ext);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ static void salamander_init(char *libretro_path, size_t sizeof_libretro_path)
|
||||||
|
|
||||||
if (config_file_exists)
|
if (config_file_exists)
|
||||||
{
|
{
|
||||||
char tmp_str[PATH_MAX];
|
char tmp_str[PATH_MAX_LENGTH];
|
||||||
config_file_t * conf = (config_file_t*)config_file_new(g_defaults.config_path);
|
config_file_t * conf = (config_file_t*)config_file_new(g_defaults.config_path);
|
||||||
|
|
||||||
if (conf)
|
if (conf)
|
||||||
|
@ -145,7 +145,7 @@ static void salamander_init(char *libretro_path, size_t sizeof_libretro_path)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char libretro_path[PATH_MAX];
|
char libretro_path[PATH_MAX_LENGTH];
|
||||||
void *args = NULL;
|
void *args = NULL;
|
||||||
struct rarch_main_wrap *wrap_args = NULL;
|
struct rarch_main_wrap *wrap_args = NULL;
|
||||||
frontend_ctx_driver_t *frontend_ctx = NULL;
|
frontend_ctx_driver_t *frontend_ctx = NULL;
|
||||||
|
|
|
@ -530,7 +530,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||||
|
|
||||||
if (android_app->getStringExtra && jstr)
|
if (android_app->getStringExtra && jstr)
|
||||||
{
|
{
|
||||||
static char config_path[PATH_MAX];
|
static char config_path[PATH_MAX_LENGTH];
|
||||||
*config_path = '\0';
|
*config_path = '\0';
|
||||||
|
|
||||||
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
||||||
|
@ -576,7 +576,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||||
|
|
||||||
if (android_app->getStringExtra && jstr)
|
if (android_app->getStringExtra && jstr)
|
||||||
{
|
{
|
||||||
static char core_path[PATH_MAX];
|
static char core_path[PATH_MAX_LENGTH];
|
||||||
*core_path = '\0';
|
*core_path = '\0';
|
||||||
|
|
||||||
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
||||||
|
@ -595,7 +595,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||||
|
|
||||||
if (android_app->getStringExtra && jstr)
|
if (android_app->getStringExtra && jstr)
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX];
|
static char path[PATH_MAX_LENGTH];
|
||||||
*path = '\0';
|
*path = '\0';
|
||||||
|
|
||||||
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
||||||
|
@ -618,7 +618,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||||
|
|
||||||
if (android_app->getStringExtra && jstr)
|
if (android_app->getStringExtra && jstr)
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX];
|
static char path[PATH_MAX_LENGTH];
|
||||||
*path = '\0';
|
*path = '\0';
|
||||||
|
|
||||||
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
||||||
|
|
|
@ -128,8 +128,8 @@ void apple_stop_iteration(void)
|
||||||
static void frontend_apple_get_environment_settings(int *argc, char *argv[],
|
static void frontend_apple_get_environment_settings(int *argc, char *argv[],
|
||||||
void *args, void *params_data)
|
void *args, void *params_data)
|
||||||
{
|
{
|
||||||
char bundle_path_buf[PATH_MAX + 1], home_dir_buf[PATH_MAX + 1],
|
char bundle_path_buf[PATH_MAX_LENGTH], home_dir_buf[PATH_MAX_LENGTH],
|
||||||
support_path_buf[PATH_MAX + 1];
|
support_path_buf[PATH_MAX_LENGTH];
|
||||||
CFURLRef bundle_url;
|
CFURLRef bundle_url;
|
||||||
CFStringRef bundle_path;
|
CFStringRef bundle_path;
|
||||||
CFBundleRef bundle = CFBundleGetMainBundle();
|
CFBundleRef bundle = CFBundleGetMainBundle();
|
||||||
|
|
|
@ -166,7 +166,7 @@ int gx_logger_file(struct _reent *r, int fd, const char *ptr, size_t len)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IS_SALAMANDER
|
#ifdef IS_SALAMANDER
|
||||||
extern char gx_rom_path[PATH_MAX];
|
extern char gx_rom_path[PATH_MAX_LENGTH];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void frontend_gx_get_environment_settings(int *argc, char *argv[],
|
static void frontend_gx_get_environment_settings(int *argc, char *argv[],
|
||||||
|
@ -219,7 +219,7 @@ static void frontend_gx_get_environment_settings(int *argc, char *argv[],
|
||||||
* filename are separate in the argument list */
|
* filename are separate in the argument list */
|
||||||
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX];
|
static char path[PATH_MAX_LENGTH];
|
||||||
*path = '\0';
|
*path = '\0';
|
||||||
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ static void frontend_gx_process_args(int *argc, char *argv[])
|
||||||
* g_settings.libretro is set here. */
|
* g_settings.libretro is set here. */
|
||||||
if (!g_settings.libretro[0] && *argc >= 1 && strrchr(argv[0], '/'))
|
if (!g_settings.libretro[0] && *argc >= 1 && strrchr(argv[0], '/'))
|
||||||
{
|
{
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX_LENGTH];
|
||||||
strlcpy(path, strrchr(argv[0], '/') + 1, sizeof(path));
|
strlcpy(path, strrchr(argv[0], '/') + 1, sizeof(path));
|
||||||
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, path);
|
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[],
|
||||||
unsigned int get_attributes;
|
unsigned int get_attributes;
|
||||||
CellGameContentSize size;
|
CellGameContentSize size;
|
||||||
char dirName[CELL_GAME_DIRNAME_SIZE];
|
char dirName[CELL_GAME_DIRNAME_SIZE];
|
||||||
char contentInfoPath[PATH_MAX];
|
char contentInfoPath[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
#ifdef HAVE_MULTIMAN
|
#ifdef HAVE_MULTIMAN
|
||||||
/* not launched from external launcher, set default path */
|
/* not launched from external launcher, set default path */
|
||||||
|
@ -114,7 +114,7 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[],
|
||||||
#ifndef IS_SALAMANDER
|
#ifndef IS_SALAMANDER
|
||||||
if (*argc > 1 && argv[1] != NULL && argv[1][0] != '\0')
|
if (*argc > 1 && argv[1] != NULL && argv[1][0] != '\0')
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX];
|
static char path[PATH_MAX_LENGTH];
|
||||||
*path = '\0';
|
*path = '\0';
|
||||||
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
|
||||||
|
|
||||||
if (argv[1] && (argv[1][0] != '\0'))
|
if (argv[1] && (argv[1][0] != '\0'))
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX];
|
static char path[PATH_MAX_LENGTH];
|
||||||
*path = '\0';
|
*path = '\0';
|
||||||
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,6 @@
|
||||||
#define BOOTER_ADDR ((uint8_t *) 0x93000000)
|
#define BOOTER_ADDR ((uint8_t *) 0x93000000)
|
||||||
#define ARGS_ADDR ((uint8_t *) 0x93200000)
|
#define ARGS_ADDR ((uint8_t *) 0x93200000)
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
|
||||||
#define PATH_MAX 4096
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern uint8_t _binary_wii_app_booter_app_booter_bin_start[];
|
extern uint8_t _binary_wii_app_booter_app_booter_bin_start[];
|
||||||
extern uint8_t _binary_wii_app_booter_app_booter_bin_end[];
|
extern uint8_t _binary_wii_app_booter_app_booter_bin_end[];
|
||||||
#define booter_start _binary_wii_app_booter_app_booter_bin_start
|
#define booter_start _binary_wii_app_booter_app_booter_bin_start
|
||||||
|
@ -43,12 +39,12 @@ extern uint8_t _binary_wii_app_booter_app_booter_bin_end[];
|
||||||
#include "../../retroarch_logger.h"
|
#include "../../retroarch_logger.h"
|
||||||
|
|
||||||
#ifdef IS_SALAMANDER
|
#ifdef IS_SALAMANDER
|
||||||
char gx_rom_path[PATH_MAX];
|
char gx_rom_path[PATH_MAX_LENGTH];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void dol_copy_argv_path(const char *dolpath, const char *argpath)
|
static void dol_copy_argv_path(const char *dolpath, const char *argpath)
|
||||||
{
|
{
|
||||||
char tmp[PATH_MAX];
|
char tmp[PATH_MAX_LENGTH];
|
||||||
size_t len, t_len;
|
size_t len, t_len;
|
||||||
struct __argv *argv = (struct __argv *) ARGS_ADDR;
|
struct __argv *argv = (struct __argv *) ARGS_ADDR;
|
||||||
memset(ARGS_ADDR, 0, sizeof(struct __argv));
|
memset(ARGS_ADDR, 0, sizeof(struct __argv));
|
||||||
|
@ -113,8 +109,8 @@ void system_exec_wii(const char *_path, bool should_load_game)
|
||||||
g_extern.verbosity = true;
|
g_extern.verbosity = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX_LENGTH];
|
||||||
char game_path[PATH_MAX];
|
char game_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
// copy heap info into stack so it survives us moving the .dol into MEM2
|
// copy heap info into stack so it survives us moving the .dol into MEM2
|
||||||
strlcpy(path, _path, sizeof(path));
|
strlcpy(path, _path, sizeof(path));
|
||||||
|
|
|
@ -361,7 +361,7 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_config,
|
||||||
enum retro_pixel_format in_pixel_format,
|
enum retro_pixel_format in_pixel_format,
|
||||||
unsigned max_width, unsigned max_height)
|
unsigned max_width, unsigned max_height)
|
||||||
{
|
{
|
||||||
char basedir[PATH_MAX];
|
char basedir[PATH_MAX_LENGTH];
|
||||||
softfilter_simd_mask_t cpu_features = rarch_get_cpu_features();
|
softfilter_simd_mask_t cpu_features = rarch_get_cpu_features();
|
||||||
struct string_list *plugs = NULL;
|
struct string_list *plugs = NULL;
|
||||||
rarch_softfilter_t *filt = NULL;
|
rarch_softfilter_t *filt = NULL;
|
||||||
|
|
|
@ -150,7 +150,7 @@ typedef struct thread_video
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
char msg[PATH_MAX];
|
char msg[PATH_MAX_LENGTH];
|
||||||
struct font_params params;
|
struct font_params params;
|
||||||
} osd_message;
|
} osd_message;
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ typedef struct thread_video
|
||||||
unsigned pitch;
|
unsigned pitch;
|
||||||
bool updated;
|
bool updated;
|
||||||
bool within_thread;
|
bool within_thread;
|
||||||
char msg[PATH_MAX];
|
char msg[PATH_MAX_LENGTH];
|
||||||
} frame;
|
} frame;
|
||||||
|
|
||||||
video_driver_t video_thread;
|
video_driver_t video_thread;
|
||||||
|
|
|
@ -40,14 +40,14 @@ static bool input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
|
||||||
unsigned idx, const char *name, const char *drv,
|
unsigned idx, const char *name, const char *drv,
|
||||||
int32_t vid, int32_t pid, bool block_osd_spam)
|
int32_t vid, int32_t pid, bool block_osd_spam)
|
||||||
{
|
{
|
||||||
if (!conf)
|
char ident[PATH_MAX_LENGTH], ident_idx[PATH_MAX_LENGTH], input_driver[PATH_MAX_LENGTH];
|
||||||
return false;
|
|
||||||
|
|
||||||
char ident[PATH_MAX], ident_idx[PATH_MAX], input_driver[PATH_MAX];
|
|
||||||
int input_vid = 0, input_pid = 0;
|
int input_vid = 0, input_pid = 0;
|
||||||
bool cond_found_idx, cond_found_general,
|
bool cond_found_idx, cond_found_general,
|
||||||
cond_found_vid = false, cond_found_pid = false;
|
cond_found_vid = false, cond_found_pid = false;
|
||||||
|
|
||||||
|
if (!conf)
|
||||||
|
return false;
|
||||||
|
|
||||||
*ident = *input_driver = '\0';
|
*ident = *input_driver = '\0';
|
||||||
|
|
||||||
config_get_array(conf, "input_device", ident, sizeof(ident));
|
config_get_array(conf, "input_device", ident, sizeof(ident));
|
||||||
|
|
|
@ -237,7 +237,7 @@ int entries_push_horizontal_menu_list(menu_handle_t *menu,
|
||||||
|
|
||||||
static void parse_drive_list(file_list_t *list)
|
static void parse_drive_list(file_list_t *list)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i = 0;
|
||||||
|
|
||||||
(void)i;
|
(void)i;
|
||||||
|
|
||||||
|
|
|
@ -5070,9 +5070,9 @@ static bool setting_data_append_list_input_options(
|
||||||
|
|
||||||
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
|
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
|
||||||
{
|
{
|
||||||
|
char label[PATH_MAX_LENGTH];
|
||||||
|
char name[PATH_MAX_LENGTH];
|
||||||
bool do_add = true;
|
bool do_add = true;
|
||||||
char label[PATH_MAX];
|
|
||||||
char name[PATH_MAX];
|
|
||||||
const struct input_bind_map* keybind =
|
const struct input_bind_map* keybind =
|
||||||
(const struct input_bind_map*)&input_config_bind_map[i];
|
(const struct input_bind_map*)&input_config_bind_map[i];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue