diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/Makefile.am | 2 | ||||
| -rw-r--r-- | common/debug.c | 3 | ||||
| -rw-r--r-- | common/debug.h | 16 |
3 files changed, 7 insertions, 14 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index b5ea6c1..eb1db28 100644 --- a/common/Makefile.am +++ b/common/Makefile.am | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | AM_CPPFLAGS = -I$(top_srcdir)/include | 1 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src |
| 2 | 2 | ||
| 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS) | 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS) |
| 4 | AM_LDFLAGS = $(libusbmuxd_LIBS) $(libplist_LIBS) ${libpthread_LIBS} | 4 | AM_LDFLAGS = $(libusbmuxd_LIBS) $(libplist_LIBS) ${libpthread_LIBS} |
diff --git a/common/debug.c b/common/debug.c index 2cc9db1..a7e33df 100644 --- a/common/debug.c +++ b/common/debug.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <time.h> | 32 | #include <time.h> |
| 33 | 33 | ||
| 34 | #include "debug.h" | 34 | #include "debug.h" |
| 35 | #include "idevice.h" | ||
| 35 | #include "libimobiledevice/libimobiledevice.h" | 36 | #include "libimobiledevice/libimobiledevice.h" |
| 36 | 37 | ||
| 37 | #ifndef STRIP_DEBUG_CODE | 38 | #ifndef STRIP_DEBUG_CODE |
| @@ -46,7 +47,7 @@ int debug_level = 0; | |||
| 46 | * | 47 | * |
| 47 | * @param level Set to 0 for no debugging or 1 for debugging. | 48 | * @param level Set to 0 for no debugging or 1 for debugging. |
| 48 | */ | 49 | */ |
| 49 | void idevice_set_debug_level(int level) | 50 | LIBIMOBILEDEVICE_API void idevice_set_debug_level(int level) |
| 50 | { | 51 | { |
| 51 | debug_level = level; | 52 | debug_level = level; |
| 52 | } | 53 | } |
diff --git a/common/debug.h b/common/debug.h index 3a66ee4..99a94b7 100644 --- a/common/debug.h +++ b/common/debug.h | |||
| @@ -25,14 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | #include <plist/plist.h> | 26 | #include <plist/plist.h> |
| 27 | 27 | ||
| 28 | #ifndef LIBIMOBILEDEVICE_INTERNAL | ||
| 29 | #ifdef WIN32 | ||
| 30 | #define LIBIMOBILEDEVICE_INTERNAL | ||
| 31 | #else | ||
| 32 | #define LIBIMOBILEDEVICE_INTERNAL __attribute__((visibility("hidden"))) | ||
| 33 | #endif | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE) | 28 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE) |
| 37 | #define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__) | 29 | #define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__) |
| 38 | #define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a) | 30 | #define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a) |
| @@ -44,14 +36,14 @@ | |||
| 44 | #define debug_plist(a) | 36 | #define debug_plist(a) |
| 45 | #endif | 37 | #endif |
| 46 | 38 | ||
| 47 | LIBIMOBILEDEVICE_INTERNAL void debug_info_real(const char *func, | 39 | void debug_info_real(const char *func, |
| 48 | const char *file, | 40 | const char *file, |
| 49 | int line, | 41 | int line, |
| 50 | const char *format, ...); | 42 | const char *format, ...); |
| 51 | 43 | ||
| 52 | LIBIMOBILEDEVICE_INTERNAL void debug_buffer(const char *data, const int length); | 44 | void debug_buffer(const char *data, const int length); |
| 53 | LIBIMOBILEDEVICE_INTERNAL void debug_buffer_to_file(const char *file, const char *data, const int length); | 45 | void debug_buffer_to_file(const char *file, const char *data, const int length); |
| 54 | LIBIMOBILEDEVICE_INTERNAL void debug_plist_real(const char *func, | 46 | void debug_plist_real(const char *func, |
| 55 | const char *file, | 47 | const char *file, |
| 56 | int line, | 48 | int line, |
| 57 | plist_t plist); | 49 | plist_t plist); |
