From: <pau...@us...> - 2010-10-05 12:43:30
|
Revision: 51629 http://firebird.svn.sourceforge.net/firebird/?rev=51629&view=rev Author: paulbeach Date: 2010-10-05 12:43:24 +0000 (Tue, 05 Oct 2010) Log Message: ----------- Fix for UDFs on Darwin Modified Paths: -------------- firebird/trunk/builds/posix/darwin.defaults firebird/trunk/src/extlib/ib_udf.cpp Modified: firebird/trunk/builds/posix/darwin.defaults =================================================================== --- firebird/trunk/builds/posix/darwin.defaults 2010-10-05 12:17:50 UTC (rev 51628) +++ firebird/trunk/builds/posix/darwin.defaults 2010-10-05 12:43:24 UTC (rev 51629) @@ -40,7 +40,7 @@ # Per-library link rules LINK_UDF = $(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -L$(LIB) -LINK_UDF_LIBS = -lm -lib_util $(THR_FLAGS) $(THR_LIBS) +LINK_UDF_LIBS = -lm $(THR_FLAGS) $(THR_LIBS) LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS)\ $(LIB_LINK_RPATH) $(LIB_LINK_SONAME) Modified: firebird/trunk/src/extlib/ib_udf.cpp =================================================================== --- firebird/trunk/src/extlib/ib_udf.cpp 2010-10-05 12:17:50 UTC (rev 51628) +++ firebird/trunk/src/extlib/ib_udf.cpp 2010-10-05 12:43:24 UTC (rev 51629) @@ -58,6 +58,8 @@ #endif // SOLARIS #endif //__ICC +typedef char* pChar; + double EXPORT IB_UDF_abs( double *a) { return (*a < 0.0) ? -*a : *a; @@ -68,7 +70,7 @@ return (acos(*a)); } -char *EXPORT IB_UDF_ascii_char( ISC_LONG *a) +pChar EXPORT IB_UDF_ascii_char( ISC_LONG *a) { if (!a) return 0; @@ -185,7 +187,7 @@ return (log10(*a)); } -char *EXPORT IB_UDF_lower(const char *s) +pChar EXPORT IB_UDF_lower(const char *s) { if (!s) return 0; @@ -205,7 +207,7 @@ return buf; } -char *EXPORT IB_UDF_lpad( const char *s, ISC_LONG *a, const char *c) +pChar EXPORT IB_UDF_lpad( const char *s, ISC_LONG *a, const char *c) { if (!s || !c) return 0; @@ -241,7 +243,7 @@ return NULL; } -char *EXPORT IB_UDF_ltrim( const char *s) +pChar EXPORT IB_UDF_ltrim( const char *s) { if (!s) return 0; @@ -293,7 +295,7 @@ return ((float) rand() / (float) RAND_MAX); } -char *EXPORT IB_UDF_rpad( const char *s, ISC_LONG *a, const char *c) +pChar EXPORT IB_UDF_rpad( const char *s, ISC_LONG *a, const char *c) { if (!s || !c) return 0; @@ -327,7 +329,7 @@ return NULL; } -char *EXPORT IB_UDF_rtrim( const char *s) +pChar EXPORT IB_UDF_rtrim( const char *s) { if (!s) return 0; @@ -369,7 +371,7 @@ return (sqrt(*a)); } -char* EXPORT IB_UDF_substr(const char* s, ISC_SHORT* m, ISC_SHORT* n) +pChar EXPORT IB_UDF_substr(const char* s, ISC_SHORT* m, ISC_SHORT* n) { if (!s) { return 0; @@ -403,7 +405,7 @@ return buf; } -char* EXPORT IB_UDF_substrlen(const char* s, ISC_SHORT* m, ISC_SHORT* n) +pChar EXPORT IB_UDF_substrlen(const char* s, ISC_SHORT* m, ISC_SHORT* n) { /* Created by Claudio Valderrama for the Firebird project, 2001.04.17 We don't want to return NULL when params are wrong This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |