File indexing completed on 2025-02-22 10:47:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef PMIX_STRNLEN_H
0017 #define PMIX_STRNLEN_H
0018
0019 #include "src/include/pmix_config.h"
0020
0021 #if defined(HAVE_STRNLEN)
0022 # define PMIX_STRNLEN(c, a, b) (c) = strnlen(a, b)
0023 #else
0024 # define PMIX_STRNLEN(c, a, b) \
0025 do { \
0026 size_t _x; \
0027 (c) = 0; \
0028 for (_x = 0; _x < (b); _x++) { \
0029 if ('\0' == (a)[_x]) { \
0030 break; \
0031 } \
0032 ++(c); \
0033 } \
0034 } while (0)
0035 #endif
0036
0037 #endif