mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:03:03 +01:00
Fix for UDFs on Darwin
This commit is contained in:
parent
79e42ead7d
commit
78ca999d4a
@ -40,7 +40,7 @@ PLATFORM_POSTBUILD_TARGET=darwin_postbuild_target
|
||||
|
||||
# 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)
|
||||
|
@ -58,6 +58,8 @@ int MATHERR(struct exception_type*)
|
||||
#endif // SOLARIS
|
||||
#endif //__ICC
|
||||
|
||||
typedef char* pChar;
|
||||
|
||||
double EXPORT IB_UDF_abs( double *a)
|
||||
{
|
||||
return (*a < 0.0) ? -*a : *a;
|
||||
@ -68,7 +70,7 @@ double EXPORT IB_UDF_acos( double *a)
|
||||
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 @@ double EXPORT IB_UDF_log10( double *a)
|
||||
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 @@ char *EXPORT IB_UDF_lower(const char *s)
|
||||
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 @@ char *EXPORT IB_UDF_lpad( const char *s, ISC_LONG *a, const char *c)
|
||||
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 @@ double EXPORT IB_UDF_rand()
|
||||
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 @@ char *EXPORT IB_UDF_rpad( const char *s, ISC_LONG *a, const char *c)
|
||||
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 @@ double EXPORT IB_UDF_sqrt( double *a)
|
||||
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 @@ char* EXPORT IB_UDF_substr(const char* s, ISC_SHORT* m, ISC_SHORT* n)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user