mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
d5ada3e15d
dbug/dbug.c: Build fix for sunfire100b. The ld does not want to link with an empty library, so we put something in it. dbug/factorial.c: Build fix for sunfire100b. When DBUG_OFF is defined, dbug is not there, and we can't use it even if we try, period.
27 lines
453 B
C
27 lines
453 B
C
#ifdef DBUG_OFF /* We are testing dbug */
|
|
|
|
int factorial(register int value) {
|
|
if(value > 1) {
|
|
value *= factorial(value-1);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
#else
|
|
|
|
#include <my_global.h>
|
|
|
|
int factorial (
|
|
register int value)
|
|
{
|
|
DBUG_ENTER ("factorial");
|
|
DBUG_PRINT ("find", ("find %d factorial", value));
|
|
if (value > 1) {
|
|
value *= factorial (value - 1);
|
|
}
|
|
DBUG_PRINT ("result", ("result is %d", value));
|
|
DBUG_RETURN (value);
|
|
}
|
|
|
|
#endif
|
|
|