/**
  * Touhou Community Reliant Automatic Patcher
  * Main DLL
  *
  * ----
  *
  * Logging functions.
  * Log to both a file and, if requested, an on-screen console.
  *
  * As of now, we do not enforce char strings to be in UTF-8.
  */

#pragma once

/// ---------------
/// Standard output
/// ---------------
// Basic
void log_print(const char *text);
// Specific length
void log_nprint(const char *text, size_t n);
// Formatted
void log_vprintf(const char *text, va_list va);
void log_printf(const char *text, ...);

#ifdef _MSC_VER
# define log_func_printf(text, ...) \
	log_printf("["__FUNCTION__"]: "text, __VA_ARGS__)
#else
# define log_func_printf(text, ...) \
	log_printf("[%s]: "text, __func__, ##__VA_ARGS__)
#endif
/// ---------------

/// -------------
/// Message boxes
// Technically not a "logging function", but hey, it has variable arguments.
/// -------------
// Basic
int log_mbox(const char *caption, const UINT type, const char *text);
// Formatted
int log_vmboxf(const char *caption, const UINT type, const char *text, va_list va);
int log_mboxf(const char *caption, const UINT type, const char *text, ...);
/// -------------

void log_init(int console);
void log_exit(void);

/**
  * Touhou Community Reliant Automatic Patcher
  * Main DLL
  *
  * ----
  *
  * Logging functions.
  * Log to both a file and, if requested, an on-screen console.
  *
  * As of now, we do not enforce char strings to be in UTF-8.
  */

#pragma once

/// ---------------
/// Standard output
/// ---------------
// Basic
void log_print(const char *text);
// Specific length
void log_nprint(const char *text, size_t n);
// Formatted
void log_vprintf(const char *text, va_list va);
void log_printf(const char *text, ...);

#define log_func_printf(text, ...) \
	log_printf("["__FUNCTION__"]: "##text, __VA_ARGS__)
/// ---------------

/// -------------
/// Message boxes
// Technically not a "logging function", but hey, it has variable arguments.
/// -------------
// Basic
int log_mbox(const char *caption, const UINT type, const char *text);
// Formatted
int log_vmboxf(const char *caption, const UINT type, const char *text, va_list va);
int log_mboxf(const char *caption, const UINT type, const char *text, ...);
/// -------------

void log_init(int console);
void log_exit(void);

--- 
+++ 
@@ -23,8 +23,13 @@
 void log_vprintf(const char *text, va_list va);
 void log_printf(const char *text, ...);
 
-#define log_func_printf(text, ...) \
-	log_printf("["__FUNCTION__"]: "##text, __VA_ARGS__)
+#ifdef _MSC_VER
+# define log_func_printf(text, ...) \
+	log_printf("["__FUNCTION__"]: "text, __VA_ARGS__)
+#else
+# define log_func_printf(text, ...) \
+	log_printf("[%s]: "text, __func__, ##__VA_ARGS__)
+#endif
 /// ---------------
 
 /// -------------
Use C99 __func__ instead of __FUNCTION__ when not compiling with Visual C++.

Couldn't they standardize __FUNCTION__ instead? A string literal that can be
concatenated with other string literals is much more flexible than a char[]
variable.
