diff options
author | Chris Robinson <[email protected]> | 2014-02-27 18:17:20 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-02-27 18:17:20 -0800 |
commit | ea8a85b19ce3c9786defaf22eab4dc4fd5011486 (patch) | |
tree | f82c741bba701ed98dacb1b7d6ec454810c3b4b3 | |
parent | 3867e3857de3b52afb505c173ace0819252b259c (diff) |
Move PATH_MAX fallback definitions to alMain.h
-rw-r--r-- | Alc/alcConfig.c | 8 | ||||
-rw-r--r-- | Alc/backends/pulseaudio.c | 3 | ||||
-rw-r--r-- | Alc/helpers.c | 10 | ||||
-rw-r--r-- | Alc/hrtf.c | 10 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 9 |
5 files changed, 9 insertions, 31 deletions
diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c index a2355fc0..740d0f86 100644 --- a/Alc/alcConfig.c +++ b/Alc/alcConfig.c @@ -32,7 +32,6 @@ #include <stdio.h> #include <ctype.h> #include <string.h> -#include <limits.h> #include "alMain.h" @@ -40,13 +39,6 @@ #include <shlobj.h> #endif -#ifndef PATH_MAX -#ifdef MAX_PATH -#define PATH_MAX MAX_PATH -#else -#define PATH_MAX 4096 -#endif -#endif typedef struct ConfigEntry { char *key; diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index e2ae52ae..1892e733 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -306,9 +306,6 @@ static ALCboolean pulse_load(void) static pa_context_flags_t pulse_ctx_flags; static pa_proplist *prop_filter; -#ifndef PATH_MAX -#define PATH_MAX 4096 -#endif /* PulseAudio Event Callbacks */ static void context_state_callback(pa_context *context, void *pdata) diff --git a/Alc/helpers.c b/Alc/helpers.c index 4b3973d9..e3f51b2c 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -32,7 +32,6 @@ #include <time.h> #include <errno.h> #include <stdarg.h> -#include <limits.h> #ifdef HAVE_MALLOC_H #include <malloc.h> #endif @@ -107,15 +106,6 @@ extern inline ALint fastf2i(ALfloat f); extern inline ALuint fastf2u(ALfloat f); -#ifndef PATH_MAX -#ifdef MAX_PATH -#define PATH_MAX MAX_PATH -#else -#define PATH_MAX 4096 -#endif -#endif - - ALuint CPUCapFlags = 0; @@ -22,7 +22,6 @@ #include <stdlib.h> #include <ctype.h> -#include <limits.h> #include "AL/al.h" #include "AL/alc.h" @@ -32,15 +31,6 @@ #include "hrtf.h" -#ifndef PATH_MAX -#ifdef MAX_PATH -#define PATH_MAX MAX_PATH -#else -#define PATH_MAX 4096 -#endif -#endif - - /* Current data set limits defined by the makehrtf utility. */ #define MIN_IR_SIZE (8) #define MAX_IR_SIZE (128) diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index e6050b7f..06fb954c 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -6,6 +6,7 @@ #include <stdarg.h> #include <assert.h> #include <math.h> +#include <limits.h> #ifdef HAVE_STRINGS_H #include <strings.h> @@ -300,6 +301,14 @@ typedef ptrdiff_t ALsizeiptrEXT; #define FORCE_ALIGN #endif +#ifndef PATH_MAX +#ifdef MAX_PATH +#define PATH_MAX MAX_PATH +#else +#define PATH_MAX 4096 +#endif +#endif + static const union { ALuint u; |