/*
 * FreeAdhocUDF - copyright (c) 2004 - 2006 adhoc dataservice GmbH
 * Christoph Theuring / Peter Mandrella / Georg Horn
 * based on FreeUDFLibC - copyright (c) 1999 Gregory Deatz
 *
 * global.h
 */

#include "ibase.h"

// pm 24.09.06
// Workaround for Firebird bug (buffer overflow):
//
// Firebird writes data after end of returned UDF data.
// Allocation of the string buffer maximum of >= 32762 Bytes
// for all strings solves this problem.
//
// n is dummy referenced to avoid "unused variable" warning.

/* #define MALLOC ib_util_malloc */

#define LOC_STRING_SIZE 256
#define MAX_STRINGBUFFER_SIZE 32768

#include "ib_util.h"
#define MALLOC(n) (ib_util_malloc((n) - (n) + MAX_STRINGBUFFER_SIZE))
