From: Aurelien Jacobs Date: Sun, 15 Jun 2014 22:40:37 +0000 (+0200) Subject: Introduce SP_API/SP_PRIV to mark visibility of functions. X-Git-Tag: libserialport-0.1.1~121 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=970f279ae4767819a816573ae354813d37d5091d;p=libserialport.git Introduce SP_API/SP_PRIV to mark visibility of functions. --- diff --git a/configure.ac b/configure.ac index 2df4865..857e4ba 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,21 @@ AC_CHECK_MEMBERS([struct termios.c_ispeed, struct termios.c_ospeed], AC_CHECK_MEMBERS([struct termios2.c_ispeed, struct termios2.c_ospeed], [AC_DEFINE(HAVE_TERMIOS2_SPEED, 1)], [], [[#include ]]) +saved="$CFLAGS"; CFLAGS="$CFLAGS -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + __attribute__((visibility("hidden"))) void foo(void) { } + ]])], + [AC_DEFINE(SP_API , __attribute__((visibility("default"))))] + [AC_DEFINE(SP_PRIV, __attribute__((visibility("hidden"))))], +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + __declspec(dllexport) void foo(void) { } + ]])], + [AC_DEFINE(SP_API , __declspec(dllexport))] + [AC_DEFINE(SP_PRIV,)], + [AC_DEFINE(SP_API,)] + [AC_DEFINE(SP_PRIV,)])) +CFLAGS="$saved" + AC_SUBST(MAKEFLAGS, '--no-print-directory') AC_SUBST(AM_LIBTOOLFLAGS, '--silent') diff --git a/libserialport_internal.h b/libserialport_internal.h index 3553b12..bb1af1a 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -187,8 +187,8 @@ extern void (*sp_debug_handler)(const char *format, ...); #define TRY(x) do { int ret = x; if (ret != SP_OK) RETURN_CODEVAL(ret); } while (0) -struct sp_port **list_append(struct sp_port **list, const char *portname); +SP_PRIV struct sp_port **list_append(struct sp_port **list, const char *portname); /* OS-specific Helper functions. */ -enum sp_return get_port_details(struct sp_port *port); -enum sp_return list_ports(struct sp_port ***list); +SP_PRIV enum sp_return get_port_details(struct sp_port *port); +SP_PRIV enum sp_return list_ports(struct sp_port ***list); diff --git a/linux.c b/linux.c index 730ba9d..9274e36 100644 --- a/linux.c +++ b/linux.c @@ -20,7 +20,7 @@ #include "libserialport.h" #include "libserialport_internal.h" -enum sp_return get_port_details(struct sp_port *port) +SP_PRIV enum sp_return get_port_details(struct sp_port *port) { /* Description limited to 127 char, anything longer would not be user friendly anyway */ @@ -156,7 +156,7 @@ enum sp_return get_port_details(struct sp_port *port) RETURN_OK(); } -enum sp_return list_ports(struct sp_port ***list) +SP_PRIV enum sp_return list_ports(struct sp_port ***list) { char name[PATH_MAX], target[PATH_MAX]; struct dirent entry, *result; diff --git a/linux_termios.c b/linux_termios.c index 9e25f27..7c1540a 100644 --- a/linux_termios.c +++ b/linux_termios.c @@ -36,7 +36,7 @@ #include #include "linux_termios.h" -int get_termios_get_ioctl(void) +SP_PRIV int get_termios_get_ioctl(void) { #ifdef HAVE_TERMIOS2 return TCGETS2; @@ -45,7 +45,7 @@ int get_termios_get_ioctl(void) #endif } -int get_termios_set_ioctl(void) +SP_PRIV int get_termios_set_ioctl(void) { #ifdef HAVE_TERMIOS2 return TCSETS2; @@ -54,7 +54,7 @@ int get_termios_set_ioctl(void) #endif } -int get_termios_size(void) +SP_PRIV int get_termios_size(void) { #ifdef HAVE_TERMIOS2 return sizeof(struct termios2); @@ -64,7 +64,7 @@ int get_termios_size(void) } #if defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED) -int get_termios_speed(void *data) +SP_PRIV int get_termios_speed(void *data) { #ifdef HAVE_TERMIOS2 struct termios2 *term = (struct termios2 *) data; @@ -77,7 +77,7 @@ int get_termios_speed(void *data) return term->c_ispeed; } -void set_termios_speed(void *data, int speed) +SP_PRIV void set_termios_speed(void *data, int speed) { #ifdef HAVE_TERMIOS2 struct termios2 *term = (struct termios2 *) data; @@ -91,12 +91,12 @@ void set_termios_speed(void *data, int speed) #endif #ifdef HAVE_TERMIOX -int get_termiox_size(void) +SP_PRIV int get_termiox_size(void) { return sizeof(struct termiox); } -int get_termiox_flow(void *data, int *rts, int *cts, int *dtr, int *dsr) +SP_PRIV int get_termiox_flow(void *data, int *rts, int *cts, int *dtr, int *dsr) { struct termiox *termx = (struct termiox *) data; int flags = 0; @@ -109,7 +109,7 @@ int get_termiox_flow(void *data, int *rts, int *cts, int *dtr, int *dsr) return flags; } -void set_termiox_flow(void *data, int rts, int cts, int dtr, int dsr) +SP_PRIV void set_termiox_flow(void *data, int rts, int cts, int dtr, int dsr) { struct termiox *termx = (struct termiox *) data; diff --git a/linux_termios.h b/linux_termios.h index 50765dc..37d4dc9 100644 --- a/linux_termios.h +++ b/linux_termios.h @@ -20,13 +20,13 @@ #ifndef LIBSERIALPORT_LINUX_TERMIOS_H #define LIBSERIALPORT_LINUX_TERMIOS_H -int get_termios_get_ioctl(void); -int get_termios_set_ioctl(void); -int get_termios_size(void); -int get_termios_speed(void *data); -void set_termios_speed(void *data, int speed); -int get_termiox_size(void); -int get_termiox_flow(void *data, int *rts, int *cts, int *dtr, int *dsr); -void set_termiox_flow(void *data, int rts, int cts, int dtr, int dsr); +SP_PRIV int get_termios_get_ioctl(void); +SP_PRIV int get_termios_set_ioctl(void); +SP_PRIV int get_termios_size(void); +SP_PRIV int get_termios_speed(void *data); +SP_PRIV void set_termios_speed(void *data, int speed); +SP_PRIV int get_termiox_size(void); +SP_PRIV int get_termiox_flow(void *data, int *rts, int *cts, int *dtr, int *dsr); +SP_PRIV void set_termiox_flow(void *data, int rts, int cts, int dtr, int dsr); #endif diff --git a/macosx.c b/macosx.c index 38495fd..236bf4c 100644 --- a/macosx.c +++ b/macosx.c @@ -21,7 +21,7 @@ #include "libserialport.h" #include "libserialport_internal.h" -enum sp_return get_port_details(struct sp_port *port) +SP_PRIV enum sp_return get_port_details(struct sp_port *port) { /* Description limited to 127 char, anything longer would not be user friendly anyway */ @@ -175,7 +175,7 @@ enum sp_return get_port_details(struct sp_port *port) RETURN_OK(); } -enum sp_return list_ports(struct sp_port ***list) +SP_PRIV enum sp_return list_ports(struct sp_port ***list) { CFMutableDictionaryRef classes; io_iterator_t iter; diff --git a/serialport.c b/serialport.c index 290786a..ef61941 100644 --- a/serialport.c +++ b/serialport.c @@ -52,7 +52,7 @@ static enum sp_return get_config(struct sp_port *port, struct port_data *data, static enum sp_return set_config(struct sp_port *port, struct port_data *data, const struct sp_port_config *config); -enum sp_return sp_get_port_by_name(const char *portname, struct sp_port **port_ptr) +SP_API enum sp_return sp_get_port_by_name(const char *portname, struct sp_port **port_ptr) { struct sp_port *port; enum sp_return ret; @@ -111,7 +111,7 @@ enum sp_return sp_get_port_by_name(const char *portname, struct sp_port **port_p RETURN_OK(); } -char *sp_get_port_name(const struct sp_port *port) +SP_API char *sp_get_port_name(const struct sp_port *port) { TRACE("%p", port); @@ -121,7 +121,7 @@ char *sp_get_port_name(const struct sp_port *port) RETURN_VALUE("%s", port->name); } -char *sp_get_port_description(struct sp_port *port) +SP_API char *sp_get_port_description(struct sp_port *port) { TRACE("%p", port); @@ -131,7 +131,7 @@ char *sp_get_port_description(struct sp_port *port) RETURN_VALUE("%s", port->description); } -enum sp_transport sp_get_port_transport(struct sp_port *port) +SP_API enum sp_transport sp_get_port_transport(struct sp_port *port) { TRACE("%p", port); @@ -141,8 +141,8 @@ enum sp_transport sp_get_port_transport(struct sp_port *port) RETURN_VALUE("%d", port->transport); } -enum sp_return sp_get_port_usb_bus_address(const struct sp_port *port, - int *usb_bus, int *usb_address) +SP_API enum sp_return sp_get_port_usb_bus_address(const struct sp_port *port, + int *usb_bus,int *usb_address) { TRACE("%p", port); @@ -159,8 +159,8 @@ enum sp_return sp_get_port_usb_bus_address(const struct sp_port *port, RETURN_OK(); } -enum sp_return sp_get_port_usb_vid_pid(const struct sp_port *port, - int *usb_vid, int *usb_pid) +SP_API enum sp_return sp_get_port_usb_vid_pid(const struct sp_port *port, + int *usb_vid, int *usb_pid) { TRACE("%p", port); @@ -177,7 +177,7 @@ enum sp_return sp_get_port_usb_vid_pid(const struct sp_port *port, RETURN_OK(); } -char *sp_get_port_usb_manufacturer(const struct sp_port *port) +SP_API char *sp_get_port_usb_manufacturer(const struct sp_port *port) { TRACE("%p", port); @@ -187,7 +187,7 @@ char *sp_get_port_usb_manufacturer(const struct sp_port *port) RETURN_VALUE("%s", port->usb_manufacturer); } -char *sp_get_port_usb_product(const struct sp_port *port) +SP_API char *sp_get_port_usb_product(const struct sp_port *port) { TRACE("%p", port); @@ -197,7 +197,7 @@ char *sp_get_port_usb_product(const struct sp_port *port) RETURN_VALUE("%s", port->usb_product); } -char *sp_get_port_usb_serial(const struct sp_port *port) +SP_API char *sp_get_port_usb_serial(const struct sp_port *port) { TRACE("%p", port); @@ -207,7 +207,7 @@ char *sp_get_port_usb_serial(const struct sp_port *port) RETURN_VALUE("%s", port->usb_serial); } -char *sp_get_port_bluetooth_address(const struct sp_port *port) +SP_API char *sp_get_port_bluetooth_address(const struct sp_port *port) { TRACE("%p", port); @@ -218,7 +218,8 @@ char *sp_get_port_bluetooth_address(const struct sp_port *port) RETURN_VALUE("%s", port->bluetooth_address); } -enum sp_return sp_get_port_handle(const struct sp_port *port, void *result_ptr) +SP_API enum sp_return sp_get_port_handle(const struct sp_port *port, + void *result_ptr) { TRACE("%p, %p", port, result_ptr); @@ -236,7 +237,8 @@ enum sp_return sp_get_port_handle(const struct sp_port *port, void *result_ptr) RETURN_OK(); } -enum sp_return sp_copy_port(const struct sp_port *port, struct sp_port **copy_ptr) +SP_API enum sp_return sp_copy_port(const struct sp_port *port, + struct sp_port **copy_ptr) { TRACE("%p, %p", port, copy_ptr); @@ -256,7 +258,7 @@ enum sp_return sp_copy_port(const struct sp_port *port, struct sp_port **copy_pt RETURN_VALUE("%p", sp_get_port_by_name(port->name, copy_ptr)); } -void sp_free_port(struct sp_port *port) +SP_API void sp_free_port(struct sp_port *port) { TRACE("%p", port); @@ -289,7 +291,8 @@ void sp_free_port(struct sp_port *port) RETURN(); } -struct sp_port **list_append(struct sp_port **list, const char *portname) +SP_PRIV struct sp_port **list_append(struct sp_port **list, + const char *portname) { void *tmp; unsigned int count; @@ -308,7 +311,7 @@ fail: return NULL; } -enum sp_return sp_list_ports(struct sp_port ***list_ptr) +SP_API enum sp_return sp_list_ports(struct sp_port ***list_ptr) { struct sp_port **list; int ret; @@ -345,7 +348,7 @@ enum sp_return sp_list_ports(struct sp_port ***list_ptr) } } -void sp_free_port_list(struct sp_port **list) +SP_API void sp_free_port_list(struct sp_port **list) { unsigned int i; @@ -387,7 +390,7 @@ void sp_free_port_list(struct sp_port **list) CHECK_PORT_HANDLE(); \ } while (0) -enum sp_return sp_open(struct sp_port *port, enum sp_mode flags) +SP_API enum sp_return sp_open(struct sp_port *port, enum sp_mode flags) { struct port_data data; struct sp_port_config config; @@ -553,7 +556,7 @@ enum sp_return sp_open(struct sp_port *port, enum sp_mode flags) RETURN_OK(); } -enum sp_return sp_close(struct sp_port *port) +SP_API enum sp_return sp_close(struct sp_port *port) { TRACE("%p", port); @@ -587,7 +590,7 @@ enum sp_return sp_close(struct sp_port *port) RETURN_OK(); } -enum sp_return sp_flush(struct sp_port *port, enum sp_buffer buffers) +SP_API enum sp_return sp_flush(struct sp_port *port, enum sp_buffer buffers) { TRACE("%p, 0x%x", port, buffers); @@ -626,7 +629,7 @@ enum sp_return sp_flush(struct sp_port *port, enum sp_buffer buffers) RETURN_OK(); } -enum sp_return sp_drain(struct sp_port *port) +SP_API enum sp_return sp_drain(struct sp_port *port) { TRACE("%p", port); @@ -662,7 +665,8 @@ enum sp_return sp_drain(struct sp_port *port) #endif } -enum sp_return sp_blocking_write(struct sp_port *port, const void *buf, size_t count, unsigned int timeout) +SP_API enum sp_return sp_blocking_write(struct sp_port *port, const void *buf, + size_t count, unsigned int timeout) { TRACE("%p, %p, %d, %d", port, buf, count, timeout); @@ -776,7 +780,8 @@ enum sp_return sp_blocking_write(struct sp_port *port, const void *buf, size_t c #endif } -enum sp_return sp_nonblocking_write(struct sp_port *port, const void *buf, size_t count) +SP_API enum sp_return sp_nonblocking_write(struct sp_port *port, + const void *buf, size_t count) { TRACE("%p, %p, %d", port, buf, count); @@ -855,7 +860,8 @@ enum sp_return sp_nonblocking_write(struct sp_port *port, const void *buf, size_ #endif } -enum sp_return sp_blocking_read(struct sp_port *port, void *buf, size_t count, unsigned int timeout) +SP_API enum sp_return sp_blocking_read(struct sp_port *port, void *buf, + size_t count, unsigned int timeout) { TRACE("%p, %p, %d, %d", port, buf, count, timeout); @@ -966,7 +972,8 @@ enum sp_return sp_blocking_read(struct sp_port *port, void *buf, size_t count, u #endif } -enum sp_return sp_nonblocking_read(struct sp_port *port, void *buf, size_t count) +SP_API enum sp_return sp_nonblocking_read(struct sp_port *port, void *buf, + size_t count) { TRACE("%p, %p, %d", port, buf, count); @@ -1019,7 +1026,7 @@ enum sp_return sp_nonblocking_read(struct sp_port *port, void *buf, size_t count #endif } -enum sp_return sp_input_waiting(struct sp_port *port) +SP_API enum sp_return sp_input_waiting(struct sp_port *port) { TRACE("%p", port); @@ -1042,7 +1049,7 @@ enum sp_return sp_input_waiting(struct sp_port *port) #endif } -enum sp_return sp_output_waiting(struct sp_port *port) +SP_API enum sp_return sp_output_waiting(struct sp_port *port) { TRACE("%p", port); @@ -1065,7 +1072,7 @@ enum sp_return sp_output_waiting(struct sp_port *port) #endif } -enum sp_return sp_new_event_set(struct sp_event_set **result_ptr) +SP_API enum sp_return sp_new_event_set(struct sp_event_set **result_ptr) { struct sp_event_set *result; @@ -1113,7 +1120,7 @@ static enum sp_return add_handle(struct sp_event_set *event_set, RETURN_OK(); } -enum sp_return sp_add_port_events(struct sp_event_set *event_set, +SP_API enum sp_return sp_add_port_events(struct sp_event_set *event_set, const struct sp_port *port, enum sp_event mask) { TRACE("%p, %p, %d", event_set, port, mask); @@ -1143,7 +1150,7 @@ enum sp_return sp_add_port_events(struct sp_event_set *event_set, RETURN_OK(); } -void sp_free_event_set(struct sp_event_set *event_set) +SP_API void sp_free_event_set(struct sp_event_set *event_set) { TRACE("%p", event_set); @@ -1164,7 +1171,8 @@ void sp_free_event_set(struct sp_event_set *event_set) RETURN(); } -enum sp_return sp_wait(struct sp_event_set *event_set, unsigned int timeout) +SP_API enum sp_return sp_wait(struct sp_event_set *event_set, + unsigned int timeout) { TRACE("%p, %d", event_set, timeout); @@ -1953,7 +1961,7 @@ static enum sp_return set_config(struct sp_port *port, struct port_data *data, RETURN_OK(); } -enum sp_return sp_new_config(struct sp_port_config **config_ptr) +SP_API enum sp_return sp_new_config(struct sp_port_config **config_ptr) { struct sp_port_config *config; @@ -1981,7 +1989,7 @@ enum sp_return sp_new_config(struct sp_port_config **config_ptr) RETURN_OK(); } -void sp_free_config(struct sp_port_config *config) +SP_API void sp_free_config(struct sp_port_config *config) { TRACE("%p", config); @@ -1993,7 +2001,8 @@ void sp_free_config(struct sp_port_config *config) RETURN(); } -enum sp_return sp_get_config(struct sp_port *port, struct sp_port_config *config) +SP_API enum sp_return sp_get_config(struct sp_port *port, + struct sp_port_config *config) { struct port_data data; @@ -2009,7 +2018,8 @@ enum sp_return sp_get_config(struct sp_port *port, struct sp_port_config *config RETURN_OK(); } -enum sp_return sp_set_config(struct sp_port *port, const struct sp_port_config *config) +SP_API enum sp_return sp_set_config(struct sp_port *port, + const struct sp_port_config *config) { struct port_data data; struct sp_port_config prev_config; @@ -2028,7 +2038,7 @@ enum sp_return sp_set_config(struct sp_port *port, const struct sp_port_config * } #define CREATE_ACCESSORS(x, type) \ -enum sp_return sp_set_##x(struct sp_port *port, type x) { \ +SP_API enum sp_return sp_set_##x(struct sp_port *port, type x) { \ struct port_data data; \ struct sp_port_config config; \ TRACE("%p, %d", port, x); \ @@ -2038,14 +2048,16 @@ enum sp_return sp_set_##x(struct sp_port *port, type x) { \ TRY(set_config(port, &data, &config)); \ RETURN_OK(); \ } \ -enum sp_return sp_get_config_##x(const struct sp_port_config *config, type *x) { \ +SP_API enum sp_return sp_get_config_##x(const struct sp_port_config *config, \ + type *x) { \ TRACE("%p, %p", config, x); \ if (!config) \ RETURN_ERROR(SP_ERR_ARG, "Null config"); \ *x = config->x; \ RETURN_OK(); \ } \ -enum sp_return sp_set_config_##x(struct sp_port_config *config, type x) { \ +SP_API enum sp_return sp_set_config_##x(struct sp_port_config *config, \ + type x) { \ TRACE("%p, %d", config, x); \ if (!config) \ RETURN_ERROR(SP_ERR_ARG, "Null config"); \ @@ -2063,7 +2075,8 @@ CREATE_ACCESSORS(dtr, enum sp_dtr) CREATE_ACCESSORS(dsr, enum sp_dsr) CREATE_ACCESSORS(xon_xoff, enum sp_xonxoff) -enum sp_return sp_set_config_flowcontrol(struct sp_port_config *config, enum sp_flowcontrol flowcontrol) +SP_API enum sp_return sp_set_config_flowcontrol(struct sp_port_config *config, + enum sp_flowcontrol flowcontrol) { if (!config) RETURN_ERROR(SP_ERR_ARG, "Null configuration"); @@ -2097,7 +2110,8 @@ enum sp_return sp_set_config_flowcontrol(struct sp_port_config *config, enum sp_ RETURN_OK(); } -enum sp_return sp_set_flowcontrol(struct sp_port *port, enum sp_flowcontrol flowcontrol) +SP_API enum sp_return sp_set_flowcontrol(struct sp_port *port, + enum sp_flowcontrol flowcontrol) { struct port_data data; struct sp_port_config config; @@ -2115,7 +2129,8 @@ enum sp_return sp_set_flowcontrol(struct sp_port *port, enum sp_flowcontrol flow RETURN_OK(); } -enum sp_return sp_get_signals(struct sp_port *port, enum sp_signal *signals) +SP_API enum sp_return sp_get_signals(struct sp_port *port, + enum sp_signal *signals) { TRACE("%p, %p", port, signals); @@ -2155,7 +2170,7 @@ enum sp_return sp_get_signals(struct sp_port *port, enum sp_signal *signals) RETURN_OK(); } -enum sp_return sp_start_break(struct sp_port *port) +SP_API enum sp_return sp_start_break(struct sp_port *port) { TRACE("%p", port); @@ -2171,7 +2186,7 @@ enum sp_return sp_start_break(struct sp_port *port) RETURN_OK(); } -enum sp_return sp_end_break(struct sp_port *port) +SP_API enum sp_return sp_end_break(struct sp_port *port) { TRACE("%p", port); @@ -2187,7 +2202,7 @@ enum sp_return sp_end_break(struct sp_port *port) RETURN_OK(); } -int sp_last_error_code(void) +SP_API int sp_last_error_code(void) { TRACE(""); #ifdef _WIN32 @@ -2197,7 +2212,7 @@ int sp_last_error_code(void) #endif } -char *sp_last_error_message(void) +SP_API char *sp_last_error_message(void) { TRACE(""); @@ -2221,7 +2236,7 @@ char *sp_last_error_message(void) #endif } -void sp_free_error_message(char *message) +SP_API void sp_free_error_message(char *message) { TRACE("%s", message); @@ -2234,7 +2249,7 @@ void sp_free_error_message(char *message) RETURN(); } -void sp_set_debug_handler(void (*handler)(const char *format, ...)) +SP_API void sp_set_debug_handler(void (*handler)(const char *format, ...)) { TRACE("%p", handler); @@ -2243,7 +2258,7 @@ void sp_set_debug_handler(void (*handler)(const char *format, ...)) RETURN(); } -void sp_default_debug_handler(const char *format, ...) +SP_API void sp_default_debug_handler(const char *format, ...) { va_list args; va_start(args, format); @@ -2254,42 +2269,42 @@ void sp_default_debug_handler(const char *format, ...) va_end(args); } -int sp_get_major_package_version(void) +SP_API int sp_get_major_package_version(void) { return SP_PACKAGE_VERSION_MAJOR; } -int sp_get_minor_package_version(void) +SP_API int sp_get_minor_package_version(void) { return SP_PACKAGE_VERSION_MINOR; } -int sp_get_micro_package_version(void) +SP_API int sp_get_micro_package_version(void) { return SP_PACKAGE_VERSION_MICRO; } -const char *sp_get_package_version_string(void) +SP_API const char *sp_get_package_version_string(void) { return SP_PACKAGE_VERSION_STRING; } -int sp_get_current_lib_version(void) +SP_API int sp_get_current_lib_version(void) { return SP_LIB_VERSION_CURRENT; } -int sp_get_revision_lib_version(void) +SP_API int sp_get_revision_lib_version(void) { return SP_LIB_VERSION_REVISION; } -int sp_get_age_lib_version(void) +SP_API int sp_get_age_lib_version(void) { return SP_LIB_VERSION_AGE; } -const char *sp_get_lib_version_string(void) +SP_API const char *sp_get_lib_version_string(void) { return SP_LIB_VERSION_STRING; } diff --git a/windows.c b/windows.c index 4c81e2e..78b6ce9 100644 --- a/windows.c +++ b/windows.c @@ -331,7 +331,7 @@ static void get_usb_details(struct sp_port *port, DEVINST dev_inst_match) return; } -enum sp_return get_port_details(struct sp_port *port) +SP_PRIV enum sp_return get_port_details(struct sp_port *port) { /* Description limited to 127 char, anything longer would not be user friendly anyway */ @@ -455,7 +455,7 @@ enum sp_return get_port_details(struct sp_port *port) RETURN_OK(); } -enum sp_return list_ports(struct sp_port ***list) +SP_PRIV enum sp_return list_ports(struct sp_port ***list) { HKEY key; TCHAR *value, *data;