diff options
Diffstat (limited to 'lib/search.in.h')
-rw-r--r-- | lib/search.in.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/lib/search.in.h b/lib/search.in.h index d991dc71d5..7fc6f65faf 100644 --- a/lib/search.in.h +++ b/lib/search.in.h @@ -38,15 +38,45 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* On native Windows, map 'lfind' to '_lfind', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lfind always. */ #if defined _WIN32 && !defined __CYGWIN__ -# undef lfind -# define lfind _lfind +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lfind +# define lfind _lfind +# endif +_GL_CXXALIAS_MDA (lfind, void *, + (const void *key, const void *base, unsigned int *nmemb, + unsigned int size, + int (*compar) (const void *, const void *))); +#else +_GL_CXXALIAS_SYS (lfind, void *, + (const void *key, const void *base, size_t *nmemb, + size_t size, + int (*compar) (const void *, const void *))); #endif +_GL_CXXALIASWARN (lfind); +/* On native Windows, map 'lsearch' to '_lsearch', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lsearch always. */ #if defined _WIN32 && !defined __CYGWIN__ -# undef lsearch -# define lsearch _lsearch +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lsearch +# define lsearch _lsearch +# endif +_GL_CXXALIAS_MDA (lsearch, void *, + (const void *key, void *base, unsigned int *nmemb, + unsigned int size, + int (*compar) (const void *, const void *))); +#else +_GL_CXXALIAS_SYS (lsearch, void *, + (const void *key, void *base, size_t *nmemb, + size_t size, + int (*compar) (const void *, const void *))); #endif +_GL_CXXALIASWARN (lsearch); #if @GNULIB_TSEARCH@ |