-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.3 2003/06/15 04:07:58 momjian Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.4 2003/06/15 04:56:45 momjian Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
static int simple_debug = 0;
static FILE *debugstream = NULL;
-void ECPGinit_sqlca(struct sqlca_t *sqlca)
+void
+ECPGinit_sqlca(struct sqlca_t *sqlca)
{
memcpy((char *)sqlca, (char *)&sqlca_init, sizeof(struct sqlca_t));
}
}
#ifdef USE_THREADS
-static void ecpg_sqlca_key_init(void)
+static void
+ecpg_sqlca_key_init(void)
{
pthread_key_create(&sqlca_key, NULL);
}
#endif
-struct sqlca_t *ECPGget_sqlca(void)
+struct sqlca_t *
+ECPGget_sqlca(void)
{
#ifdef USE_THREADS
struct sqlca_t *sqlca;
pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
- sqlca = pthread_getspecific(&sqlca_key);
+ sqlca = pthread_getspecific(sqlca_key);
if( sqlca == NULL )
{
sqlca = malloc(sizeof(struct sqlca_t));
ECPGinit_sqlca(sqlca);
- pthread_setspecific(&sqlca_key, sqlca);
+ pthread_setspecific(sqlca_key, sqlca);
}
return( sqlca );
#else
{
#endif
+struct sqlca_t;
+
+void ECPGinit_sqlca(struct sqlca_t *sqlca);
void ECPGdebug(int, FILE *);
bool ECPGstatus(int, const char *);
bool ECPGsetcommit(int, const char *, const char *);
bool ECPGprepare(int, char *, char *);
bool ECPGdeallocate(int, char *);
bool ECPGdeallocate_all(int);
-char *ECPGprepared_statement(char *);
+char *ECPGprepared_statement(char *);
void ECPGlog(const char *format,...);
-char *ECPGerrmsg(void);
+char *ECPGerrmsg(void);
/* print an error message */
void sqlprint(void);