Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of extern in declarations, following libtool docs #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/libcnotify.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int libcnotify_stream_close(

/* Value to indicate if the verbose notification is active
*/
LIBCNOTIFY_EXTERN \
LIBCNOTIFY_EXTERN_VARIABLE \
int libcnotify_verbose;

/* Sets the verbose notification
Expand Down
6 changes: 4 additions & 2 deletions include/libcnotify/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
#define LIBCNOTIFY_EXTERN __declspec(dllexport)

#elif defined( LIBCNOTIFY_DLL_IMPORT )
#define LIBCNOTIFY_EXTERN extern __declspec(dllimport)
#define LIBCNOTIFY_EXTERN __declspec(dllimport)

#else
#define LIBCNOTIFY_EXTERN extern
#define LIBCNOTIFY_EXTERN

#endif

#define LIBCNOTIFY_EXTERN_VARIABLE extern LIBCNOTIFY_EXTERN

#endif /* !defined( _LIBCNOTIFY_EXTERN_H ) */

8 changes: 1 addition & 7 deletions libcnotify/libcnotify_extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@

#include <libcnotify/extern.h>

#if defined( __CYGWIN__ ) || defined( __MINGW32__ )
#define LIBCNOTIFY_EXTERN_VARIABLE extern
#else
#define LIBCNOTIFY_EXTERN_VARIABLE LIBCNOTIFY_EXTERN
#endif

#else
#define LIBCNOTIFY_EXTERN /* extern */
#define LIBCNOTIFY_EXTERN
#define LIBCNOTIFY_EXTERN_VARIABLE extern

#endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */
Expand Down