summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/synctexdir/synctex_parser_utils.c')
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
index 95a4df5dc55..4016df0d0cf 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
@@ -60,9 +60,7 @@
#define SYNCTEX_OS2 1
#endif
-#ifdef _WIN32_WINNT_WINXP
#define SYNCTEX_RECENT_WINDOWS 1
-#endif
#ifdef SYNCTEX_WINDOWS
#include <windows.h>
@@ -83,7 +81,9 @@ void _synctex_free(void * ptr) {
}
}
+#if !defined(_MSC_VER)
# include <syslog.h>
+#endif
int _synctex_log(int level, const char * prompt, const char * reason,va_list arg) {
int result;
@@ -135,7 +135,11 @@ int _synctex_error(const char * reason,...) {
va_list arg;
int result;
va_start (arg, reason);
+#if defined(SYNCTEX_RECENT_WINDOWS) /* LOG_ERR is not used */
+ result = _synctex_log(0, "! SyncTeX Error : ", reason, arg);
+#else
result = _synctex_log(LOG_ERR, "! SyncTeX Error : ", reason, arg);
+#endif
va_end (arg);
return result;
}
@@ -144,7 +148,11 @@ int _synctex_debug(const char * reason,...) {
va_list arg;
int result;
va_start (arg, reason);
+#if defined(SYNCTEX_RECENT_WINDOWS) /* LOG_DEBUG is not used */
+ result = _synctex_log(0, "! SyncTeX Error : ", reason, arg);
+#else
result = _synctex_log(LOG_DEBUG, "! SyncTeX Error : ", reason, arg);
+#endif
va_end (arg);
return result;
}