Bug #7624 | Compilation failure: Missing prototype | ||
---|---|---|---|
Submitted: | 3 Jan 2005 11:18 | Modified: | 4 Jan 2005 12:27 |
Reporter: | Joerg Bruehe | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S1 (Critical) |
Version: | 5.0.3-pre | OS: | IBM AIX (AIX, IRIX) |
Assigned to: | Vadim Tkachenko | CPU Architecture: | Any |
[3 Jan 2005 11:18]
Joerg Bruehe
[3 Jan 2005 15:44]
Joerg Bruehe
I checked on 'aix43': It is not the formatting - even if the macro definition is a one-liner, it fails the same way. But I found that the cpp functionality of '__STRING()' seems to be the reason: When I replace '__STRING(L)' in the macro definition by a constant string "missing", the module compiles. Compilation then fails in 'buf0buf.c' on the call to 'mutex_create()' in line 530, which again is a macro whose definition includes a call to '__STRING(L)'. On other platforms, we have error messages about '__STRING' being undefined. So it is the use of '__STRING' that causes these problems.
[3 Jan 2005 19:10]
Heikki Tuuri
Vadim, the following code in ut0dbg.h compiles on all platforms. Maybe best to use #? Regards, Heikki #define ut_a(EXPR) do {\ if (!((ulint)(EXPR) + ut_dbg_zero)) {\ ut_print_timestamp(stderr);\ fprintf(stderr, ut_dbg_msg_assert_fail,\ os_thread_pf(os_thread_get_curr_id()), __FILE__,\ (ulint)__LINE__);\ fputs("InnoDB: Failing assertion: " #EXPR "\n", stderr);\ fputs(ut_dbg_msg_trap, stderr);\ ut_dbg_stop_threads = TRUE;\ if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL;\ }\ if (ut_dbg_stop_threads) {\ fprintf(stderr, ut_dbg_msg_stop,\ os_thread_pf(os_thread_get_curr_id()), __FILE__, (ulint)__LINE__);\ os_thread_sleep(1000000000);\ }\ } while (0) #define ut_error do {\ ut_print_timestamp(stderr);\ fprintf(stderr, ut_dbg_msg_assert_fail,\ os_thread_pf(os_thread_get_curr_id()), __FILE__, (ulint)__LINE__);\ fprintf(stderr, ut_dbg_msg_trap);\ ut_dbg_stop_threads = TRUE;\ if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL;\ } while (0)
[4 Jan 2005 12:27]
Vadim Tkachenko
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: I replaced __STRING() with #