@@ -42,33 +42,33 @@ extern "C" {
4242#endif /* defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || \
4343 defined(__NT__) */
4444
45- extern LIBACQUIRE_LIB_EXPORT bool is_directory (const char * );
45+ extern LIBACQUIRE_EXPORT bool is_directory (const char * );
4646
47- extern LIBACQUIRE_LIB_EXPORT bool is_file (const char * );
47+ extern LIBACQUIRE_EXPORT bool is_file (const char * );
4848
4949/**
5050 * @brief Check if a file exists.
5151 *
5252 * @param path Path of the file to check.
5353 * @return `true` if path is present
5454 */
55- extern LIBACQUIRE_LIB_EXPORT bool exists (const char * path );
55+ extern LIBACQUIRE_EXPORT bool exists (const char * path );
5656
5757/**
5858 * @brief Get the size of a given path
5959 *
6060 * @param path Path of the file to get the size of.
6161 * @return `-1` if file doesn't exist otherwise its size
6262 */
63- extern LIBACQUIRE_LIB_EXPORT off_t filesize (const char * path );
63+ extern LIBACQUIRE_EXPORT off_t filesize (const char * path );
6464
6565/**
6666 * @brief Get the size of a given path
6767 *
6868 * @param path Path of the file to determine relativity of
6969 * @return `true` if the path is a relative
7070 */
71- extern LIBACQUIRE_LIB_EXPORT bool is_relative (const char * path );
71+ extern LIBACQUIRE_EXPORT bool is_relative (const char * path );
7272
7373/**
7474 * @brief Get the extension from a path
@@ -77,9 +77,11 @@ extern LIBACQUIRE_LIB_EXPORT bool is_relative(const char *path);
7777 * @return `path` if the path failed to determine extension otherwise extension
7878 * (with leading ".").
7979 */
80- extern LIBACQUIRE_LIB_EXPORT const char * get_extension (const char * path );
80+ extern LIBACQUIRE_EXPORT const char * get_extension (const char * path );
81+
82+ #if defined(LIBACQUIRE_IMPLEMENTATION ) && !defined(LIBACQUIRE_IMPL_ACQUIRE_FILEUTILS )
83+ #define LIBACQUIRE_ACQUIRE_FILEUTILS_IMPL
8184
82- #ifdef LIBACQUIRE_IMPLEMENTATION
8385bool is_directory (const char * const path ) {
8486#if defined(WIN32 ) || defined(_WIN32 ) || defined(__WIN32__ ) || defined(__NT__ )
8587 const DWORD dwAttrib = GetFileAttributes (path );
@@ -157,7 +159,7 @@ const char *get_extension(const char *const filename) {
157159 return strncmp (ext0 , ".tar" , 4 ) == 0 ? ext0 : ext1 ;
158160}
159161
160- #endif /* LIBACQUIRE_IMPLEMENTATION */
162+ #endif /* defined( LIBACQUIRE_IMPLEMENTATION) && !defined(LIBACQUIRE_IMPL_ACQUIRE_FILEUTILS) */
161163
162164#ifdef __cplusplus
163165}
0 commit comments