]> git.sesse.net Git - vlc/blobdiff - src/misc/messages.c
Don't include config.h from the headers - refs #297.
[vlc] / src / misc / messages.c
index e00dbaf2b70d5ca65015db98231f8f78b62eb381..9fc91a3088df99811a45d92afe22a04d44bb14ba 100644 (file)
  * Preamble
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #include <stdarg.h>                                       /* va_list for BSD */
@@ -295,12 +299,20 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
     int          i_size = strlen(psz_format) + INTF_MAX_MSG_SIZE;
 #endif
 
-    if( p_this == NULL || p_this->i_flags & OBJECT_FLAGS_QUIET ||
-        (p_this->i_flags & OBJECT_FLAGS_NODBG && i_type == VLC_MSG_DBG) )
+    if( p_this == NULL )
     {
+#ifndef NDEBUG
+        if( i_type == VLC_MSG_DBG )
+            return;
+#endif
+        utf8_vfprintf( stderr, psz_format, _args );
         return;
     }
 
+    if( p_this->i_flags & OBJECT_FLAGS_QUIET ||
+        (p_this->i_flags & OBJECT_FLAGS_NODBG && i_type == VLC_MSG_DBG) )
+        return;
+
 #ifndef __GLIBC__
     /* Expand %m to strerror(errno) - only once */
     char buf[strlen( psz_format ) + 2001], *ptr;