mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 18:31:57 +08:00
define _DEBUG and NDEBUG for develmode or not resp.
This commit is contained in:
16
configure.ac
16
configure.ac
@@ -83,7 +83,6 @@ dnl User selectable options
|
||||
|
||||
dnl System wide options
|
||||
devel_mode="no"
|
||||
use_debug="no"
|
||||
trace_message="no"
|
||||
message_string="no"
|
||||
|
||||
@@ -286,10 +285,6 @@ AC_ARG_ENABLE(develmode,
|
||||
[ --enable-develmode developer mode <default=no>],
|
||||
devel_mode=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug build with debugging messages <default=no>],
|
||||
use_debug=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(tracemsg,
|
||||
[ --enable-tracemsg trace messages of MiniGUI <default=no>],
|
||||
trace_message=$enableval)
|
||||
@@ -1642,7 +1637,6 @@ if test "x$fixed_math" = "xyes"; then
|
||||
fi
|
||||
|
||||
if test "x$devel_mode" = "xyes"; then
|
||||
use_debug="yes"
|
||||
message_string="yes"
|
||||
trace_message="no"
|
||||
|
||||
@@ -1698,8 +1692,6 @@ if test "x$devel_mode" = "xyes"; then
|
||||
enable_video_shadow="yes"
|
||||
enable_video_mlshadow="yes"
|
||||
enable_video_custom="yes"
|
||||
|
||||
build_screensaver="yes"
|
||||
fi
|
||||
|
||||
dnl Depedencies
|
||||
@@ -1711,11 +1703,6 @@ if test "x$build_ctrl_treeview_rdr" = "xyes"; then
|
||||
build_ctrl_scrollview="yes"
|
||||
fi
|
||||
|
||||
if test "x$use_debug" = "xyes"; then
|
||||
AC_DEFINE(_DEBUG, 1,
|
||||
[Define if build with debugging messages])
|
||||
fi
|
||||
|
||||
if test "x$trace_message" = "xyes"; then
|
||||
message_string="yes"
|
||||
|
||||
@@ -2439,9 +2426,12 @@ dnl define _GNU_SOURCE for pthread_rwlock_t
|
||||
CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
||||
|
||||
if test "x$devel_mode" = "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -D_DEBUG"
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -Wall -Werror"
|
||||
fi
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS -DNDEBUG"
|
||||
fi
|
||||
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
|
||||
@@ -40,6 +40,13 @@
|
||||
#define _MGUI_COMMON_H
|
||||
|
||||
#ifndef MINIGUI_MAJOR_VERSION
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
# undef PACKAGE_BUGREPORT
|
||||
# undef PACKAGE_NAME
|
||||
# undef PACKAGE_STRING
|
||||
# undef PACKAGE_TARNAME
|
||||
# undef PACKAGE_VERSION
|
||||
# ifdef __MINIGUI_LIB__
|
||||
# ifdef _FOR_DATANG
|
||||
# ifdef WIN32
|
||||
@@ -57,24 +64,18 @@
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
# undef PACKAGE_BUGREPORT
|
||||
# undef PACKAGE_NAME
|
||||
# undef PACKAGE_STRING
|
||||
# undef PACKAGE_TARNAME
|
||||
# undef PACKAGE_VERSION
|
||||
# include "mgconfig.h"
|
||||
# undef PACKAGE
|
||||
# undef VERSION
|
||||
# undef PACKAGE_BUGREPORT
|
||||
# undef PACKAGE_NAME
|
||||
# undef PACKAGE_STRING
|
||||
# undef PACKAGE_TARNAME
|
||||
# undef PACKAGE_VERSION
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
/**
|
||||
* \defgroup macros_types Macros and data types commonly used
|
||||
* @{
|
||||
@@ -1898,8 +1899,6 @@ int init_minigui_printf (int (*output_char) (int ch),
|
||||
# define _DBG_PRINTF(fmt...)
|
||||
# endif
|
||||
#else /* __GNUC__ */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
static inline void _ERR_PRINTF(const char* fmt, ...)
|
||||
{
|
||||
@@ -1966,8 +1965,6 @@ int start_minigui_pthread (int (* pth_entry) (int argc, const char* argv []),
|
||||
int argc, const char* argv[],
|
||||
char* stack_base, unsigned int stack_size);
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef ESRCH
|
||||
# define ESRCH 3
|
||||
#endif
|
||||
|
||||
@@ -696,8 +696,8 @@ GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id)
|
||||
HDC dc;
|
||||
gal_pixel pixel;
|
||||
|
||||
if ((we_attr_id & WE_ATTR_TYPE_MASK)!=WE_ATTR_TYPE_COLOR) {
|
||||
_MG_PRINTF ("GUI: Can't get color. ID is invalid.\n");
|
||||
if ((we_attr_id & WE_ATTR_TYPE_MASK) != WE_ATTR_TYPE_COLOR) {
|
||||
_MG_PRINTF ("GUI: Can't get color; invalid attr id: %x.\n", we_attr_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user