File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 8
8
#ifndef UMF_OS_MEMORY_PROVIDER_INTERNAL_H
9
9
#define UMF_OS_MEMORY_PROVIDER_INTERNAL_H
10
10
11
+ #include <limits.h>
12
+
13
+ #ifdef _WIN32
14
+ #ifndef NAME_MAX
15
+ #include <stdlib.h>
16
+ #define NAME_MAX _MAX_FNAME
17
+ #endif /* !NAME_MAX */
18
+ #endif /* _WIN32 */
19
+
11
20
#include <umf/providers/provider_os_memory.h>
12
21
13
22
#include "critnib.h"
@@ -24,8 +33,6 @@ typedef enum umf_purge_advise_t {
24
33
UMF_PURGE_FORCE ,
25
34
} umf_purge_advise_t ;
26
35
27
- #define NAME_MAX 255
28
-
29
36
typedef struct os_memory_provider_t {
30
37
unsigned protection ; // combination of OS-specific protection flags
31
38
unsigned visibility ; // memory visibility mode
Original file line number Diff line number Diff line change 38
38
#endif
39
39
40
40
#include <assert.h>
41
+ #include <limits.h>
41
42
#include <stdio.h>
42
43
43
44
#include <umf/memory_pool.h>
@@ -113,7 +114,6 @@ void proxy_lib_create_common(void) {
113
114
umf_result_t umf_result ;
114
115
115
116
#ifndef _WIN32
116
- #define NAME_MAX 255
117
117
char shm_name [NAME_MAX ];
118
118
119
119
if (util_env_var_has_str ("UMF_PROXY" , "page.disposition=shared-fd" )) {
@@ -136,7 +136,6 @@ void proxy_lib_create_common(void) {
136
136
"named shared memory: %s" ,
137
137
os_params .shm_name );
138
138
}
139
- #undef NAME_MAX
140
139
#endif
141
140
142
141
umf_result = umfMemoryProviderCreate (umfOsMemoryProviderOps (), & os_params ,
You can’t perform that action at this time.
0 commit comments