build: add define guard around UV_EXTERN (#3855)

Incidentally lets users control the definition of UV_EXTERN.
This commit is contained in:
Zvicii 2023-01-04 05:03:37 +08:00 committed by GitHub
parent e9d91fccfc
commit 12b8c116a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@ extern "C" {
#error "Define either BUILDING_UV_SHARED or USING_UV_SHARED, not both."
#endif
#ifndef UV_EXTERN
#ifdef _WIN32
/* Windows - set up dll import/export decorators. */
# if defined(BUILDING_UV_SHARED)
@ -50,6 +51,7 @@ extern "C" {
#else
# define UV_EXTERN /* nothing */
#endif
#endif /* UV_EXTERN */
#include "uv/errno.h"
#include "uv/version.h"