diff --git a/include/pq/libpq-fe.h b/include/pq/libpq-fe.h deleted file mode 100644 index 09b0caa..0000000 --- a/include/pq/libpq-fe.h +++ /dev/null @@ -1,587 +0,0 @@ -/*------------------------------------------------------------------------- - * - * libpq-fe.h - * This file contains definitions for structures and - * externs for functions used by frontend postgres applications. - * - * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * src/interfaces/libpq/libpq-fe.h - * - *------------------------------------------------------------------------- - */ - -#ifndef LIBPQ_FE_H -#define LIBPQ_FE_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -/* - * postgres_ext.h defines the backend's externally visible types, - * such as Oid. - */ -#include "postgres_ext.h" - -/* - * Option flags for PQcopyResult - */ -#define PG_COPYRES_ATTRS 0x01 -#define PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */ -#define PG_COPYRES_EVENTS 0x04 -#define PG_COPYRES_NOTICEHOOKS 0x08 - -/* Application-visible enum types */ - -/* - * Although it is okay to add to these lists, values which become unused - * should never be removed, nor should constants be redefined - that would - * break compatibility with existing code. - */ - -typedef enum -{ - CONNECTION_OK, - CONNECTION_BAD, - /* Non-blocking mode only below here */ - - /* - * The existence of these should never be relied upon - they should only - * be used for user feedback or similar purposes. - */ - CONNECTION_STARTED, /* Waiting for connection to be made. */ - CONNECTION_MADE, /* Connection OK; waiting to send. */ - CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the - * postmaster. */ - CONNECTION_AUTH_OK, /* Received authentication; waiting for - * backend startup. */ - CONNECTION_SETENV, /* Negotiating environment. */ - CONNECTION_SSL_STARTUP, /* Negotiating SSL. */ - CONNECTION_NEEDED /* Internal state: connect() needed */ -} ConnStatusType; - -typedef enum -{ - PGRES_POLLING_FAILED = 0, - PGRES_POLLING_READING, /* These two indicate that one may */ - PGRES_POLLING_WRITING, /* use select before polling again. */ - PGRES_POLLING_OK, - PGRES_POLLING_ACTIVE /* unused; keep for awhile for backwards - * compatibility */ -} PostgresPollingStatusType; - -typedef enum -{ - PGRES_EMPTY_QUERY = 0, /* empty query string was executed */ - PGRES_COMMAND_OK, /* a query command that doesn't return - * anything was executed properly by the - * backend */ - PGRES_TUPLES_OK, /* a query command that returns tuples was - * executed properly by the backend, PGresult - * contains the result tuples */ - PGRES_COPY_OUT, /* Copy Out data transfer in progress */ - PGRES_COPY_IN, /* Copy In data transfer in progress */ - PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the - * backend */ - PGRES_NONFATAL_ERROR, /* notice or warning message */ - PGRES_FATAL_ERROR, /* query failed */ - PGRES_COPY_BOTH, /* Copy In/Out data transfer in progress */ - PGRES_SINGLE_TUPLE /* single tuple from larger resultset */ -} ExecStatusType; - -typedef enum -{ - PQTRANS_IDLE, /* connection idle */ - PQTRANS_ACTIVE, /* command in progress */ - PQTRANS_INTRANS, /* idle, within transaction block */ - PQTRANS_INERROR, /* idle, within failed transaction */ - PQTRANS_UNKNOWN /* cannot determine status */ -} PGTransactionStatusType; - -typedef enum -{ - PQERRORS_TERSE, /* single-line error messages */ - PQERRORS_DEFAULT, /* recommended style */ - PQERRORS_VERBOSE /* all the facts, ma'am */ -} PGVerbosity; - -/* - * PGPing - The ordering of this enum should not be altered because the - * values are exposed externally via pg_isready. - */ - -typedef enum -{ - PQPING_OK, /* server is accepting connections */ - PQPING_REJECT, /* server is alive but rejecting connections */ - PQPING_NO_RESPONSE, /* could not establish connection */ - PQPING_NO_ATTEMPT /* connection not attempted (bad params) */ -} PGPing; - -/* PGconn encapsulates a connection to the backend. - * The contents of this struct are not supposed to be known to applications. - */ -typedef struct pg_conn PGconn; - -/* PGresult encapsulates the result of a query (or more precisely, of a single - * SQL command --- a query string given to PQsendQuery can contain multiple - * commands and thus return multiple PGresult objects). - * The contents of this struct are not supposed to be known to applications. - */ -typedef struct pg_result PGresult; - -/* PGcancel encapsulates the information needed to cancel a running - * query on an existing connection. - * The contents of this struct are not supposed to be known to applications. - */ -typedef struct pg_cancel PGcancel; - -/* PGnotify represents the occurrence of a NOTIFY message. - * Ideally this would be an opaque typedef, but it's so simple that it's - * unlikely to change. - * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's, - * whereas in earlier versions it was always your own backend's PID. - */ -typedef struct pgNotify -{ - char *relname; /* notification condition name */ - int be_pid; /* process ID of notifying server process */ - char *extra; /* notification parameter */ - /* Fields below here are private to libpq; apps should not use 'em */ - struct pgNotify *next; /* list link */ -} PGnotify; - -/* Function types for notice-handling callbacks */ -typedef void (*PQnoticeReceiver) (void *arg, const PGresult *res); -typedef void (*PQnoticeProcessor) (void *arg, const char *message); - -/* Print options for PQprint() */ -typedef char pqbool; - -typedef struct _PQprintOpt -{ - pqbool header; /* print output field headings and row count */ - pqbool align; /* fill align the fields */ - pqbool standard; /* old brain dead format */ - pqbool html3; /* output html tables */ - pqbool expanded; /* expand tables */ - pqbool pager; /* use pager for output if needed */ - char *fieldSep; /* field separator */ - char *tableOpt; /* insert to HTML */ - char *caption; /* HTML
*/ - char **fieldName; /* null terminated array of replacement field - * names */ -} PQprintOpt; - -/* ---------------- - * Structure for the conninfo parameter definitions returned by PQconndefaults - * or PQconninfoParse. - * - * All fields except "val" point at static strings which must not be altered. - * "val" is either NULL or a malloc'd current-value string. PQconninfoFree() - * will release both the val strings and the PQconninfoOption array itself. - * ---------------- - */ -typedef struct _PQconninfoOption -{ - char *keyword; /* The keyword of the option */ - char *envvar; /* Fallback environment variable name */ - char *compiled; /* Fallback compiled in default value */ - char *val; /* Option's current value, or NULL */ - char *label; /* Label for field in connect dialog */ - char *dispchar; /* Indicates how to display this field in a - * connect dialog. Values are: "" Display - * entered value as is "*" Password field - - * hide value "D" Debug option - don't show - * by default */ - int dispsize; /* Field size in characters for dialog */ -} PQconninfoOption; - -/* ---------------- - * PQArgBlock -- structure for PQfn() arguments - * ---------------- - */ -typedef struct -{ - int len; - int isint; - union - { - int *ptr; /* can't use void (dec compiler barfs) */ - int integer; - } u; -} PQArgBlock; - -/* ---------------- - * PGresAttDesc -- Data about a single attribute (column) of a query result - * ---------------- - */ -typedef struct pgresAttDesc -{ - char *name; /* column name */ - Oid tableid; /* source table, if known */ - int columnid; /* source column, if known */ - int format; /* format code for value (text/binary) */ - Oid typid; /* type id */ - int typlen; /* type size */ - int atttypmod; /* type-specific modifier info */ -} PGresAttDesc; - -/* ---------------- - * Exported functions of libpq - * ---------------- - */ - -/* === in fe-connect.c === */ - -/* make a new client connection to the backend */ -/* Asynchronous (non-blocking) */ -extern PGconn *PQconnectStart(const char *conninfo); -extern PGconn *PQconnectStartParams(const char *const * keywords, - const char *const * values, int expand_dbname); -extern PostgresPollingStatusType PQconnectPoll(PGconn *conn); - -/* Synchronous (blocking) */ -extern PGconn *PQconnectdb(const char *conninfo); -extern PGconn *PQconnectdbParams(const char *const * keywords, - const char *const * values, int expand_dbname); -extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport, - const char *pgoptions, const char *pgtty, - const char *dbName, - const char *login, const char *pwd); - -#define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME) \ - PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL) - -/* close the current connection and free the PGconn data structure */ -extern void PQfinish(PGconn *conn); - -/* get info about connection options known to PQconnectdb */ -extern PQconninfoOption *PQconndefaults(void); - -/* parse connection options in same way as PQconnectdb */ -extern PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg); - -/* return the connection options used by a live connection */ -extern PQconninfoOption *PQconninfo(PGconn *conn); - -/* free the data structure returned by PQconndefaults() or PQconninfoParse() */ -extern void PQconninfoFree(PQconninfoOption *connOptions); - -/* - * close the current connection and restablish a new one with the same - * parameters - */ -/* Asynchronous (non-blocking) */ -extern int PQresetStart(PGconn *conn); -extern PostgresPollingStatusType PQresetPoll(PGconn *conn); - -/* Synchronous (blocking) */ -extern void PQreset(PGconn *conn); - -/* request a cancel structure */ -extern PGcancel *PQgetCancel(PGconn *conn); - -/* free a cancel structure */ -extern void PQfreeCancel(PGcancel *cancel); - -/* issue a cancel request */ -extern int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize); - -/* backwards compatible version of PQcancel; not thread-safe */ -extern int PQrequestCancel(PGconn *conn); - -/* Accessor functions for PGconn objects */ -extern char *PQdb(const PGconn *conn); -extern char *PQuser(const PGconn *conn); -extern char *PQpass(const PGconn *conn); -extern char *PQhost(const PGconn *conn); -extern char *PQport(const PGconn *conn); -extern char *PQtty(const PGconn *conn); -extern char *PQoptions(const PGconn *conn); -extern ConnStatusType PQstatus(const PGconn *conn); -extern PGTransactionStatusType PQtransactionStatus(const PGconn *conn); -extern const char *PQparameterStatus(const PGconn *conn, - const char *paramName); -extern int PQprotocolVersion(const PGconn *conn); -extern int PQserverVersion(const PGconn *conn); -extern char *PQerrorMessage(const PGconn *conn); -extern int PQsocket(const PGconn *conn); -extern int PQbackendPID(const PGconn *conn); -extern int PQconnectionNeedsPassword(const PGconn *conn); -extern int PQconnectionUsedPassword(const PGconn *conn); -extern int PQclientEncoding(const PGconn *conn); -extern int PQsetClientEncoding(PGconn *conn, const char *encoding); - -/* Get the OpenSSL structure associated with a connection. Returns NULL for - * unencrypted connections or if any other TLS library is in use. */ -extern void *PQgetssl(PGconn *conn); - -/* Tell libpq whether it needs to initialize OpenSSL */ -extern void PQinitSSL(int do_init); - -/* More detailed way to tell libpq whether it needs to initialize OpenSSL */ -extern void PQinitOpenSSL(int do_ssl, int do_crypto); - -/* Set verbosity for PQerrorMessage and PQresultErrorMessage */ -extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity); - -/* Enable/disable tracing */ -extern void PQtrace(PGconn *conn, FILE *debug_port); -extern void PQuntrace(PGconn *conn); - -/* Override default notice handling routines */ -extern PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn, - PQnoticeReceiver proc, - void *arg); -extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, - PQnoticeProcessor proc, - void *arg); - -/* - * Used to set callback that prevents concurrent access to - * non-thread safe functions that libpq needs. - * The default implementation uses a libpq internal mutex. - * Only required for multithreaded apps that use kerberos - * both within their app and for postgresql connections. - */ -typedef void (*pgthreadlock_t) (int acquire); - -extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler); - -/* === in fe-exec.c === */ - -/* Simple synchronous query */ -extern PGresult *PQexec(PGconn *conn, const char *query); -extern PGresult *PQexecParams(PGconn *conn, - const char *command, - int nParams, - const Oid *paramTypes, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); -extern PGresult *PQprepare(PGconn *conn, const char *stmtName, - const char *query, int nParams, - const Oid *paramTypes); -extern PGresult *PQexecPrepared(PGconn *conn, - const char *stmtName, - int nParams, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); - -/* Interface for multiple-result or asynchronous queries */ -extern int PQsendQuery(PGconn *conn, const char *query); -extern int PQsendQueryParams(PGconn *conn, - const char *command, - int nParams, - const Oid *paramTypes, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); -extern int PQsendPrepare(PGconn *conn, const char *stmtName, - const char *query, int nParams, - const Oid *paramTypes); -extern int PQsendQueryPrepared(PGconn *conn, - const char *stmtName, - int nParams, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); -extern int PQsetSingleRowMode(PGconn *conn); -extern PGresult *PQgetResult(PGconn *conn); - -/* Routines for managing an asynchronous query */ -extern int PQisBusy(PGconn *conn); -extern int PQconsumeInput(PGconn *conn); - -/* LISTEN/NOTIFY support */ -extern PGnotify *PQnotifies(PGconn *conn); - -/* Routines for copy in/out */ -extern int PQputCopyData(PGconn *conn, const char *buffer, int nbytes); -extern int PQputCopyEnd(PGconn *conn, const char *errormsg); -extern int PQgetCopyData(PGconn *conn, char **buffer, int async); - -/* Deprecated routines for copy in/out */ -extern int PQgetline(PGconn *conn, char *string, int length); -extern int PQputline(PGconn *conn, const char *string); -extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize); -extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes); -extern int PQendcopy(PGconn *conn); - -/* Set blocking/nonblocking connection to the backend */ -extern int PQsetnonblocking(PGconn *conn, int arg); -extern int PQisnonblocking(const PGconn *conn); -extern int PQisthreadsafe(void); -extern PGPing PQping(const char *conninfo); -extern PGPing PQpingParams(const char *const * keywords, - const char *const * values, int expand_dbname); - -/* Force the write buffer to be written (or at least try) */ -extern int PQflush(PGconn *conn); - -/* - * "Fast path" interface --- not really recommended for application - * use - */ -extern PGresult *PQfn(PGconn *conn, - int fnid, - int *result_buf, - int *result_len, - int result_is_int, - const PQArgBlock *args, - int nargs); - -/* Accessor functions for PGresult objects */ -extern ExecStatusType PQresultStatus(const PGresult *res); -extern char *PQresStatus(ExecStatusType status); -extern char *PQresultErrorMessage(const PGresult *res); -extern char *PQresultErrorField(const PGresult *res, int fieldcode); -extern int PQntuples(const PGresult *res); -extern int PQnfields(const PGresult *res); -extern int PQbinaryTuples(const PGresult *res); -extern char *PQfname(const PGresult *res, int field_num); -extern int PQfnumber(const PGresult *res, const char *field_name); -extern Oid PQftable(const PGresult *res, int field_num); -extern int PQftablecol(const PGresult *res, int field_num); -extern int PQfformat(const PGresult *res, int field_num); -extern Oid PQftype(const PGresult *res, int field_num); -extern int PQfsize(const PGresult *res, int field_num); -extern int PQfmod(const PGresult *res, int field_num); -extern char *PQcmdStatus(PGresult *res); -extern char *PQoidStatus(const PGresult *res); /* old and ugly */ -extern Oid PQoidValue(const PGresult *res); /* new and improved */ -extern char *PQcmdTuples(PGresult *res); -extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num); -extern int PQgetlength(const PGresult *res, int tup_num, int field_num); -extern int PQgetisnull(const PGresult *res, int tup_num, int field_num); -extern int PQnparams(const PGresult *res); -extern Oid PQparamtype(const PGresult *res, int param_num); - -/* Describe prepared statements and portals */ -extern PGresult *PQdescribePrepared(PGconn *conn, const char *stmt); -extern PGresult *PQdescribePortal(PGconn *conn, const char *portal); -extern int PQsendDescribePrepared(PGconn *conn, const char *stmt); -extern int PQsendDescribePortal(PGconn *conn, const char *portal); - -/* Delete a PGresult */ -extern void PQclear(PGresult *res); - -/* For freeing other alloc'd results, such as PGnotify structs */ -extern void PQfreemem(void *ptr); - -/* Exists for backward compatibility. bjm 2003-03-24 */ -#define PQfreeNotify(ptr) PQfreemem(ptr) - -/* Error when no password was given. */ -/* Note: depending on this is deprecated; use PQconnectionNeedsPassword(). */ -#define PQnoPasswordSupplied "fe_sendauth: no password supplied\n" - -/* Create and manipulate PGresults */ -extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status); -extern PGresult *PQcopyResult(const PGresult *src, int flags); -extern int PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs); -extern void *PQresultAlloc(PGresult *res, size_t nBytes); -extern int PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len); - -/* Quoting strings before inclusion in queries. */ -extern size_t PQescapeStringConn(PGconn *conn, - char *to, const char *from, size_t length, - int *error); -extern char *PQescapeLiteral(PGconn *conn, const char *str, size_t len); -extern char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len); -extern unsigned char *PQescapeByteaConn(PGconn *conn, - const unsigned char *from, size_t from_length, - size_t *to_length); -extern unsigned char *PQunescapeBytea(const unsigned char *strtext, - size_t *retbuflen); - -/* These forms are deprecated! */ -extern size_t PQescapeString(char *to, const char *from, size_t length); -extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_length, - size_t *to_length); - - - -/* === in fe-print.c === */ - -extern void PQprint(FILE *fout, /* output stream */ - const PGresult *res, - const PQprintOpt *ps); /* option structure */ - -/* - * really old printing routines - */ -extern void PQdisplayTuples(const PGresult *res, - FILE *fp, /* where to send the output */ - int fillAlign, /* pad the fields with spaces */ - const char *fieldSep, /* field separator */ - int printHeader, /* display headers? */ - int quiet); - -extern void PQprintTuples(const PGresult *res, - FILE *fout, /* output stream */ - int printAttName, /* print attribute names */ - int terseOutput, /* delimiter bars */ - int width); /* width of column, if 0, use variable width */ - - -/* === in fe-lobj.c === */ - -/* Large-object access routines */ -extern int lo_open(PGconn *conn, Oid lobjId, int mode); -extern int lo_close(PGconn *conn, int fd); -extern int lo_read(PGconn *conn, int fd, char *buf, size_t len); -extern int lo_write(PGconn *conn, int fd, const char *buf, size_t len); -extern int lo_lseek(PGconn *conn, int fd, int offset, int whence); -extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence); -extern Oid lo_creat(PGconn *conn, int mode); -extern Oid lo_create(PGconn *conn, Oid lobjId); -extern int lo_tell(PGconn *conn, int fd); -extern pg_int64 lo_tell64(PGconn *conn, int fd); -extern int lo_truncate(PGconn *conn, int fd, size_t len); -extern int lo_truncate64(PGconn *conn, int fd, pg_int64 len); -extern int lo_unlink(PGconn *conn, Oid lobjId); -extern Oid lo_import(PGconn *conn, const char *filename); -extern Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId); -extern int lo_export(PGconn *conn, Oid lobjId, const char *filename); - -/* === in fe-misc.c === */ - -/* Get the version of the libpq library in use */ -extern int PQlibVersion(void); - -/* Determine length of multibyte encoded char at *s */ -extern int PQmblen(const char *s, int encoding); - -/* Determine display length of multibyte encoded char at *s */ -extern int PQdsplen(const char *s, int encoding); - -/* Get encoding id from environment variable PGCLIENTENCODING */ -extern int PQenv2encoding(void); - -/* === in fe-auth.c === */ - -extern char *PQencryptPassword(const char *passwd, const char *user); - -/* === in encnames.c === */ - -extern int pg_char_to_encoding(const char *name); -extern const char *pg_encoding_to_char(int encoding); -extern int pg_valid_server_encoding_id(int encoding); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBPQ_FE_H */ diff --git a/include/pq/pg_config.h b/include/pq/pg_config.h deleted file mode 100644 index 41710a2..0000000 --- a/include/pq/pg_config.h +++ /dev/null @@ -1,840 +0,0 @@ -/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */ - -/* Define to the type of arg 1 of 'accept' */ -#define ACCEPT_TYPE_ARG1 int - -/* Define to the type of arg 2 of 'accept' */ -#define ACCEPT_TYPE_ARG2 struct sockaddr * - -/* Define to the type of arg 3 of 'accept' */ -#define ACCEPT_TYPE_ARG3 socklen_t - -/* Define to the return type of 'accept' */ -#define ACCEPT_TYPE_RETURN int - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The normal alignment of `double', in bytes. */ -#define ALIGNOF_DOUBLE 8 - -/* The normal alignment of `int', in bytes. */ -#define ALIGNOF_INT 4 - -/* The normal alignment of `long', in bytes. */ -#define ALIGNOF_LONG 8 - -/* The normal alignment of `long long int', in bytes. */ -#define ALIGNOF_LONG_LONG_INT 8 - -/* The normal alignment of `short', in bytes. */ -#define ALIGNOF_SHORT 2 - -/* Size of a disk block --- this also limits the size of a tuple. You can set - it bigger if you need bigger tuples (although TOAST should reduce the need - to have large tuples, since fields can be spread across multiple tuples). - BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is - currently 2^15 (32768). This is determined by the 15-bit widths of the - lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h). - Changing BLCKSZ requires an initdb. */ -#define BLCKSZ 8192 - -/* Define to the default TCP port number on which the server listens and to - which clients will try to connect. This can be overridden at run-time, but - it's convenient if your clients have the right default compiled in. - (--with-pgport=PORTNUM) */ -#define DEF_PGPORT 5432 - -/* Define to the default TCP port number as a string constant. */ -#define DEF_PGPORT_STR "5432" - -/* Define to build with GSSAPI support. (--with-gssapi) */ -/* #undef ENABLE_GSS */ - -/* Define to 1 if you want National Language Support. (--enable-nls) */ -/* #undef ENABLE_NLS */ - -/* Define to 1 to build client libraries as thread-safe code. - (--enable-thread-safety) */ -#define ENABLE_THREAD_SAFETY 1 - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#define FLEXIBLE_ARRAY_MEMBER 1 - -/* float4 values are passed by value if 'true', by reference if 'false' */ -#define FLOAT4PASSBYVAL true - -/* float8, int8, and related values are passed by value if 'true', by - reference if 'false' */ -#define FLOAT8PASSBYVAL true - -/* Define to 1 if getpwuid_r() takes a 5th argument. */ -#define GETPWUID_R_5ARG 1 - -/* Define to 1 if gettimeofday() takes only 1 argument. */ -/* #undef GETTIMEOFDAY_1ARG */ - -#ifdef GETTIMEOFDAY_1ARG -# define gettimeofday(a,b) gettimeofday(a) -#endif - -/* Define to 1 if you have the `append_history' function. */ -/* #undef HAVE_APPEND_HISTORY */ - -/* Define to 1 if you have the `cbrt' function. */ -/* #undef HAVE_CBRT */ - -/* Define to 1 if you have the `class' function. */ -/* #undef HAVE_CLASS */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRTDEFS_H */ - -/* Define to 1 if you have the `crypt' function. */ -/* #undef HAVE_CRYPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRYPT_H 1 - -/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you - don't. */ -#define HAVE_DECL_FDATASYNC 1 - -/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you - don't. */ -/* #undef HAVE_DECL_F_FULLFSYNC */ - -/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you - don't. */ -#define HAVE_DECL_POSIX_FADVISE 1 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 1 - -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRLCAT */ - -/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRLCPY */ - -/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_SIGLIST 1 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLD_H */ - -/* Define to 1 if you have the `dlopen' function. */ -/* #undef HAVE_DLOPEN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_EDITLINE_HISTORY_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_EDITLINE_READLINE_H */ - -/* Define to 1 if you have the `fdatasync' function. */ -#define HAVE_FDATASYNC 1 -/* Define to 1 if you have the `fls' function. */ -/* #undef HAVE_FLS */ - -/* Define to 1 if you have the `fpclass' function. */ -/* #undef HAVE_FPCLASS */ - -/* Define to 1 if you have the `fp_class' function. */ -/* #undef HAVE_FP_CLASS */ - -/* Define to 1 if you have the `fp_class_d' function. */ -/* #undef HAVE_FP_CLASS_D */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FP_CLASS_H */ - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#define HAVE_FSEEKO 1 - -/* Define to 1 if your compiler understands __func__. */ -#define HAVE_FUNCNAME__FUNC 1 - -/* Define to 1 if your compiler understands __FUNCTION__. */ -/* #undef HAVE_FUNCNAME__FUNCTION */ -/* Define to 1 if you have __sync_lock_test_and_set(int *) and friends. */ -#define HAVE_GCC_INT_ATOMICS 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `gethostbyname_r' function. */ -#define HAVE_GETHOSTBYNAME_R 1 - -/* Define to 1 if you have the `getifaddrs' function. */ -#define HAVE_GETIFADDRS 1 - -/* Define to 1 if you have the `getopt' function. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GETOPT_H 1 - -/* Define to 1 if you have the `getopt_long' function. */ -#define HAVE_GETOPT_LONG 1 - -/* Define to 1 if you have the `getpeereid' function. */ -/* #undef HAVE_GETPEEREID */ - -/* Define to 1 if you have the `getpeerucred' function. */ -/* #undef HAVE_GETPEERUCRED */ - -/* Define to 1 if you have the `getpwuid_r' function. */ -#define HAVE_GETPWUID_R 1 - -/* Define to 1 if you have the `getrlimit' function. */ -#define HAVE_GETRLIMIT 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_HISTORY_H */ - -/* Define to 1 if you have the `history_truncate_file' function. */ -/* #undef HAVE_HISTORY_TRUNCATE_FILE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IEEEFP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_IFADDRS_H 1 - -/* Define to 1 if you have the `inet_aton' function. */ -#define HAVE_INET_ATON 1 - -/* Define to 1 if the system has the type `int64'. */ -/* #undef HAVE_INT64 */ - -/* Define to 1 if the system has the type `int8'. */ -/* #undef HAVE_INT8 */ - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the global variable 'int opterr'. */ -/* #undef HAVE_INT_OPTERR */ - -/* Define to 1 if you have the global variable 'int optreset'. */ -/* #undef HAVE_INT_OPTRESET */ - -/* Define to 1 if you have the global variable 'int timezone'. */ -/* #undef HAVE_INT_TIMEZONE */ - -/* Define to 1 if you have support for IPv6. */ -#define HAVE_IPV6 1 - -/* Define to 1 if you have isinf(). */ -#define HAVE_ISINF 1 - -/* Define to 1 if `e_data' is member of `krb5_error'. */ -/* #undef HAVE_KRB5_ERROR_E_DATA */ - -/* Define to 1 if `text.data' is member of `krb5_error'. */ -/* #undef HAVE_KRB5_ERROR_TEXT_DATA */ - -/* Define to 1 if you have krb5_free_unparsed_name */ -/* #undef HAVE_KRB5_FREE_UNPARSED_NAME */ - -/* Define to 1 if `client' is member of `krb5_ticket'. */ -/* #undef HAVE_KRB5_TICKET_CLIENT */ - -/* Define to 1 if `enc_part2' is member of `krb5_ticket'. */ -/* #undef HAVE_KRB5_TICKET_ENC_PART2 */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LDAP_H */ - -/* Define to 1 if you have the `crypto' library (-lcrypto). */ -/* #undef HAVE_LIBCRYPTO */ - -/* Define to 1 if you have the `ldap' library (-lldap). */ -/* #undef HAVE_LIBLDAP */ - -/* Define to 1 if you have the `ldap_r' library (-lldap_r). */ -/* #undef HAVE_LIBLDAP_R */ - -/* Define to 1 if you have the `m' library (-lm). */ -#define HAVE_LIBM 1 - -/* Define to 1 if you have the `pam' library (-lpam). */ -/* #undef HAVE_LIBPAM */ - -/* Define if you have a function readline library */ -#define HAVE_LIBREADLINE 1 - -/* Define to 1 if you have the `selinux' library (-lselinux). */ -/* #undef HAVE_LIBSELINUX */ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -/* #undef HAVE_LIBSSL */ - -/* Define to 1 if you have the `wldap32' library (-lwldap32). */ -/* #undef HAVE_LIBWLDAP32 */ - -/* Define to 1 if you have the `xml2' library (-lxml2). */ -/* #undef HAVE_LIBXML2 */ - -/* Define to 1 if you have the `xslt' library (-lxslt). */ -/* #undef HAVE_LIBXSLT */ - -/* Define to 1 if you have the `z' library (-lz). */ -#define HAVE_LIBZ 1 - -/* Define to 1 if constants of type 'long long int' should have the suffix LL. - */ -/* #undef HAVE_LL_CONSTANTS */ - -/* Define to 1 if the system has the type `locale_t'. */ -/* #undef HAVE_LOCALE_T */ - -/* Define to 1 if `long int' works and is 64 bits. */ -#define HAVE_LONG_INT_64 1 - -/* Define to 1 if the system has the type `long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if `long long int' works and is 64 bits. */ -#define HAVE_LONG_LONG_INT_64 1 -/* Define to 1 if you have the `mbstowcs_l' function. */ -/* #undef HAVE_MBSTOWCS_L */ - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */ -/* #undef HAVE_MINIDUMP_TYPE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_TCP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OSSP_UUID_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PAM_PAM_APPL_H */ - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `posix_fadvise' function. */ -#define HAVE_POSIX_FADVISE 1 - -/* Define to 1 if you have the POSIX signal interface. */ -#define HAVE_POSIX_SIGNALS 1 - -/* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */ -/* #undef HAVE_PPC_LWARX_MUTEX_HINT */ - -/* Define to 1 if you have the `pstat' function. */ -/* #undef HAVE_PSTAT */ - -/* Define to 1 if the PS_STRINGS thing exists. */ -/* #undef HAVE_PS_STRINGS */ - -/* Define if you have POSIX threads libraries and header files. */ -#define HAVE_PTHREAD 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_READLINE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_READLINE_HISTORY_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_READLINE_READLINE_H */ - -/* Define to 1 if you have the `readlink' function. */ -#define HAVE_READLINK 1 - -/* Define to 1 if you have the `rint' function. */ -/* #undef HAVE_RINT */ - -/* Define to 1 if you have the global variable - 'rl_completion_append_character'. */ -/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */ - -/* Define to 1 if you have the `rl_completion_matches' function. */ -/* #undef HAVE_RL_COMPLETION_MATCHES */ - -/* Define to 1 if you have the `rl_filename_completion_function' function. */ -/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SECURITY_PAM_APPL_H */ - -/* Define to 1 if you have the `setproctitle' function. */ -/* #undef HAVE_SETPROCTITLE */ - -/* Define to 1 if you have the `setsid' function. */ -#define HAVE_SETSID 1 - -/* Define to 1 if you have the `sigprocmask' function. */ -#define HAVE_SIGPROCMASK 1 - -/* Define to 1 if you have sigsetjmp(). */ -/* #undef HAVE_SIGSETJMP */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have spinlocks. */ -/* #undef HAVE_SPINLOCKS */ - -/* Define to 1 if you have the `srandom' function. */ -#define HAVE_SRANDOM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcat' function. */ -/* #undef HAVE_STRLCAT */ - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if you have the `strtoq' function. */ -#define HAVE_STRTOQ 1 - -/* Define to 1 if you have the `strtoull' function. */ -#define HAVE_STRTOULL 1 - -/* Define to 1 if you have the `strtouq' function. */ -#define HAVE_STRTOUQ 1 - -/* Define to 1 if the system has the type `struct addrinfo'. */ -#define HAVE_STRUCT_ADDRINFO 1 - -/* Define to 1 if the system has the type `struct cmsgcred'. */ -/* #undef HAVE_STRUCT_CMSGCRED */ - -/* Define to 1 if the system has the type `struct option'. */ -#define HAVE_STRUCT_OPTION 1 - -/* Define to 1 if `sa_len' is member of `struct sockaddr'. */ -#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 - -/* Define to 1 if `__ss_family' is member of `struct sockaddr_storage'. */ -/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ - -/* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */ -/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */ - -/* Define to 1 if `tm_zone' is member of `struct tm'. */ -#define HAVE_STRUCT_TM_TM_ZONE 1 - -/* Define to 1 if you have the `symlink' function. */ -#define HAVE_SYMLINK 1 - -/* Define to 1 if you have the syslog interface. */ -#define HAVE_SYSLOG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IPC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_POLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SEM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SHM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TAS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UCRED_H 1 -/* #undef HAVE_SYS_UCRED_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use - `HAVE_STRUCT_TM_TM_ZONE' instead. */ -#define HAVE_TM_ZONE 1 - -/* Define to 1 if you have the `towlower' function. */ -#define HAVE_TOWLOWER 1 - -/* Define to 1 if you have the external array `tzname'. */ -#define HAVE_TZNAME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UCRED_H */ - -/* Define to 1 if the system has the type `uint64'. */ -/* #undef HAVE_UINT64 */ - -/* Define to 1 if the system has the type `uint8'. */ -/* #undef HAVE_UINT8 */ - -/* Define to 1 if the system has the type `uintptr_t'. */ -#define HAVE_UINTPTR_T 1 - -/* Define to 1 if the system has the type `union semun'. */ -#define HAVE_UNION_SEMUN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have unix sockets. */ -/* #undef HAVE_UNIX_SOCKETS */ - -/* Define to 1 if you have the `unsetenv' function. */ -#define HAVE_UNSETENV 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the `utimes' function. */ -#define HAVE_UTIMES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UUID_H */ - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the `waitpid' function. */ -#define HAVE_WAITPID 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define to 1 if you have the `wcstombs' function. */ -#define HAVE_WCSTOMBS 1 - -/* Define to 1 if you have the `wcstombs_l' function. */ -/* #undef HAVE_WCSTOMBS_L */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINLDAP_H */ - -/* Define to the appropriate snprintf format for 64-bit ints. */ -#define INT64_FORMAT "%ld" - -/* Define to build with Kerberos 5 support. (--with-krb5) */ -/* #undef KRB5 */ - -/* Define to 1 if `locale_t' requires . */ -/*#define LOCALE_T_IN_XLOCALE 1*/ - -/* Define as the maximum alignment requirement of any C data type. */ -#define MAXIMUM_ALIGNOF 8 - -/* Define bytes to use libc memset(). */ -#define MEMSET_LOOP_LIMIT 1024 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "http://github.com/LuaDist/Repository" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "PostgreSQL" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PostgreSQL 9.2.1" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "libpq" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "9.2.1" - -/* Define to the name of the default PostgreSQL service principal in Kerberos. - (--with-krb-srvnam=NAME) */ -#define PG_KRB_SRVNAM "postgres" - -/* PostgreSQL major version as a string */ -#define PG_MAJORVERSION "9.2;" - -/* PostgreSQL version as a string */ -#define PG_VERSION "9.2.1" - -/* PostgreSQL version as a number */ -#define PG_VERSION_NUM 90201 - -/* A string containing the version number, platform, and C compiler */ -#define PG_VERSION_STR "PostgreSQL 9.2.1 LuaDist" - -/* Define to 1 to allow profiling output to be saved separately for each - process. */ -/* #undef PROFILE_PID_DIR */ - -/* Define to the necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus, - the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger - than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be - less than your OS' limit on file size. This is often 2 GB or 4GB in a - 32-bit operating system, unless you have large file support enabled. By - default, we make the limit 1 GB to avoid any possible integer-overflow - problems within the OS. A limit smaller than necessary only means we divide - a large relation into more chunks than necessary, so it seems best to err - in the direction of a small limit. A power-of-2 value is recommended to - save a few cycles in md.c, but is not absolutely required. Changing - RELSEG_SIZE requires an initdb. */ -#define RELSEG_SIZE 131072 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `off_t', as computed by sizeof. */ -#define SIZEOF_OFF_T 8 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r() returns a int. */ -#define STRERROR_R_INT 1 - -/* Define to 1 if your declares `struct tm'. */ -/* #undef TM_IN_SYS_TIME */ - -/* Define to the appropriate snprintf format for unsigned 64-bit ints. */ -#define UINT64_FORMAT "%lu" - -/* Define to 1 to build with assertion checks. (--enable-cassert) */ -/* #undef USE_ASSERT_CHECKING */ - -/* Define to 1 to build with Bonjour support. (--with-bonjour) */ -/* #undef USE_BONJOUR */ - -/* Define to 1 if you want float4 values to be passed by value. - (--enable-float4-byval) */ -#define USE_FLOAT4_BYVAL 1 - -/* Define to 1 if you want float8, int8, etc values to be passed by value. - (--enable-float8-byval) */ -#define USE_FLOAT8_BYVAL 1 - -/* Define to 1 if "static inline" works without unwanted warnings from - compilations where static inline functions are defined but not called. */ -#define USE_INLINE 1 - -/* Define to 1 if you want 64-bit integer timestamp and interval support. - (--enable-integer-datetimes) */ -#define USE_INTEGER_DATETIMES 1 - -/* Define to 1 to build with LDAP support. (--with-ldap) */ -/* #undef USE_LDAP */ - -/* Define to 1 to build with XML support. (--with-libxml) */ -/* #undef USE_LIBXML */ - -/* Define to 1 to use XSLT support when building contrib/xml2. - (--with-libxslt) */ -/* #undef USE_LIBXSLT */ - -/* Define to select named POSIX semaphores. */ -#define USE_NAMED_POSIX_SEMAPHORES 1 - -/* Define to 1 to build with PAM support. (--with-pam) */ -/* #undef USE_PAM */ - -/* Use replacement snprintf() functions. */ -/* #undef USE_REPL_SNPRINTF */ - -/* Define to build with (Open)SSL support. (--with-openssl) */ -/* #undef USE_SSL */ - -/* Define to select SysV-style semaphores. */ -#define USE_SYSV_SEMAPHORES 1 - -/* Define to select SysV-style shared memory. */ -#define USE_SYSV_SHARED_MEMORY 1 - -/* Define to select unnamed POSIX semaphores. */ -/* #undef USE_UNNAMED_POSIX_SEMAPHORES */ - -/* Define to select Win32-style semaphores. */ -/* #undef USE_WIN32_SEMAPHORES */ - -/* Define to select Win32-style shared memory. */ -/* #undef USE_WIN32_SHARED_MEMORY */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* #undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Size of a WAL file block. This need have no particular relation to BLCKSZ. - XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O, - XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O - buffers, else direct I/O may fail. Changing XLOG_BLCKSZ requires an initdb. - */ -#define XLOG_BLCKSZ 8192 - -/* XLOG_SEG_SIZE is the size of a single WAL file. This must be a power of 2 - and larger than XLOG_BLCKSZ (preferably, a great deal larger than - XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */ -#define XLOG_SEG_SIZE (16 * 1024 * 1024) - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the type of a signed integer type wide enough to hold a pointer, - if such a type exists, and if the system does not define it. */ -/* #undef intptr_t */ - -/* Define to empty if the C compiler does not understand signed types. */ -/* #undef signed */ - -/* Define to the type of an unsigned integer type wide enough to hold a - pointer, if such a type exists, and if the system does not define it. */ -/* #undef uintptr_t */ - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/include/pq/pg_config_ext.h b/include/pq/pg_config_ext.h deleted file mode 100644 index b4c07dd..0000000 --- a/include/pq/pg_config_ext.h +++ /dev/null @@ -1,8 +0,0 @@ -/* src/include/pg_config_ext.h. Generated from pg_config_ext.h.in by configure. */ -/* - * src/include/pg_config_ext.h.in. This is generated manually, not by - * autoheader, since we want to limit which symbols get defined here. - */ - -/* Define to the name of a signed 64-bit integer type. */ -#define PG_INT64_TYPE long int diff --git a/include/pq/pg_config_os.h b/include/pq/pg_config_os.h deleted file mode 100644 index bcaa42d..0000000 --- a/include/pq/pg_config_os.h +++ /dev/null @@ -1,22 +0,0 @@ -/* src/include/port/linux.h */ - -/* - * As of July 2007, all known versions of the Linux kernel will sometimes - * return EIDRM for a shmctl() operation when EINVAL is correct (it happens - * when the low-order 15 bits of the supplied shm ID match the slot number - * assigned to a newer shmem segment). We deal with this by assuming that - * EIDRM means EINVAL in PGSharedMemoryIsInUse(). This is reasonably safe - * since in fact Linux has no excuse for ever returning EIDRM; it doesn't - * track removed segments in a way that would allow distinguishing them from - * private ones. But someday that code might get upgraded, and we'd have - * to have a kernel version test here. - */ -#define HAVE_LINUX_EIDRM_BUG - -/* - * Set the default wal_sync_method to fdatasync. With recent Linux versions, - * xlogdefs.h's normal rules will prefer open_datasync, which (a) doesn't - * perform better and (b) causes outright failures on ext4 data=journal - * filesystems, because those don't support O_DIRECT. - */ -#define PLATFORM_DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC diff --git a/include/pq/pg_config_paths.h b/include/pq/pg_config_paths.h deleted file mode 100755 index 6ae3e9a..0000000 --- a/include/pq/pg_config_paths.h +++ /dev/null @@ -1,12 +0,0 @@ -#define PGBINDIR "bin" -#define PGSHAREDIR "share/libpq" -#define SYSCONFDIR "etc" -#define INCLUDEDIR "include" -#define PKGINCLUDEDIR "include" -#define INCLUDEDIRSERVER "include" -#define LIBDIR "lib" -#define PKGLIBDIR "share/pgklib" -#define LOCALEDIR "share/locale" -#define DOCDIR "share/libpq/doc" -#define HTMLDIR "share/libpq/doc/html" -#define MANDIR "share/libpq/doc/man" diff --git a/include/pq/postgres_ext.h b/include/pq/postgres_ext.h deleted file mode 100644 index 74c344c..0000000 --- a/include/pq/postgres_ext.h +++ /dev/null @@ -1,69 +0,0 @@ -/*------------------------------------------------------------------------- - * - * postgres_ext.h - * - * This file contains declarations of things that are visible everywhere - * in PostgreSQL *and* are visible to clients of frontend interface libraries. - * For example, the Oid type is part of the API of libpq and other libraries. - * - * Declarations which are specific to a particular interface should - * go in the header file for that interface (such as libpq-fe.h). This - * file is only for fundamental Postgres declarations. - * - * User-written C functions don't count as "external to Postgres." - * Those function much as local modifications to the backend itself, and - * use header files that are otherwise internal to Postgres to interface - * with the backend. - * - * src/include/postgres_ext.h - * - *------------------------------------------------------------------------- - */ - -#ifndef POSTGRES_EXT_H -#define POSTGRES_EXT_H - -#include "pg_config_ext.h" - -/* - * Object ID is a fundamental type in Postgres. - */ -typedef unsigned int Oid; - -#ifdef __cplusplus -#define InvalidOid (Oid(0)) -#else -#define InvalidOid ((Oid) 0) -#endif - -#define OID_MAX UINT_MAX -/* you will need to include to use the above #define */ - -/* Define a signed 64-bit integer type for use in client API declarations. */ -typedef PG_INT64_TYPE pg_int64; - - -/* - * Identifiers of error message fields. Kept here to keep common - * between frontend and backend, and also to export them to libpq - * applications. - */ -#define PG_DIAG_SEVERITY 'S' -#define PG_DIAG_SQLSTATE 'C' -#define PG_DIAG_MESSAGE_PRIMARY 'M' -#define PG_DIAG_MESSAGE_DETAIL 'D' -#define PG_DIAG_MESSAGE_HINT 'H' -#define PG_DIAG_STATEMENT_POSITION 'P' -#define PG_DIAG_INTERNAL_POSITION 'p' -#define PG_DIAG_INTERNAL_QUERY 'q' -#define PG_DIAG_CONTEXT 'W' -#define PG_DIAG_SCHEMA_NAME 's' -#define PG_DIAG_TABLE_NAME 't' -#define PG_DIAG_COLUMN_NAME 'c' -#define PG_DIAG_DATATYPE_NAME 'd' -#define PG_DIAG_CONSTRAINT_NAME 'n' -#define PG_DIAG_SOURCE_FILE 'F' -#define PG_DIAG_SOURCE_LINE 'L' -#define PG_DIAG_SOURCE_FUNCTION 'R' - -#endif /* POSTGRES_EXT_H */ diff --git a/lib/import/import-libpq.mk b/lib/import/import-libpq.mk deleted file mode 100644 index 0b6cbde..0000000 --- a/lib/import/import-libpq.mk +++ /dev/null @@ -1,5 +0,0 @@ -INC_DIR += $(call select_from_ports,pgsql)/src/lib/postgres/src/include -INC_DIR += $(call select_from_ports,pgsql)/src/lib/postgres/src/include/libpq -INC_DIR += $(call select_from_ports,pgsql)/src/lib/postgres/src/interfaces/libpq -INC_DIR += $(call select_from_ports,pgsql)/src/lib/postgres/src/port -INC_DIR +=$(REP_DIR)/include/pq diff --git a/lib/import/import-libpqxx.mk b/lib/import/import-libpqxx.mk deleted file mode 100644 index 757185f..0000000 --- a/lib/import/import-libpqxx.mk +++ /dev/null @@ -1,2 +0,0 @@ -INC_DIR += $(call select_from_ports,libpqxx)/src/lib/libpqxx/include -INC_DIR +=$(REP_DIR)/include/pqxx diff --git a/lib/mk/libpq.mk b/lib/mk/libpq.mk deleted file mode 100644 index 4927f24..0000000 --- a/lib/mk/libpq.mk +++ /dev/null @@ -1,48 +0,0 @@ -include $(REP_DIR)/lib/import/import-libpq.mk - -LIBPQ_PORT_DIR := $(call select_from_ports,pgsql) -LIBPQ_SRC_DIR := $(LIBPQ_PORT_DIR)/src/lib/postgres - -CC_OPT += -DFRONTEND -DUNSAFE_STAT_OK - -# files interfaces libpq -SRC_C += fe-auth.c\ - fe-connect.c\ - fe-exec.c\ - fe-misc.c\ - fe-print.c\ - fe-lobj.c\ - fe-protocol2.c\ - fe-protocol3.c\ - pqexpbuffer.c\ - fe-secure.c\ - libpq-events.c\ - chklocale.c\ - encnames.c\ - getpeereid.c\ - inet_net_ntop.c\ - ip.c\ - md5.c\ - noblock.c\ - pgstrcasecmp.c\ - pqsignal.c\ - strlcpy.c\ - thread.c\ - wchar.c\ - -#dummy files for sigwait -SRC_C += dummy_sig_method.c - -#definition of vpath -vpath % $(LIBPQ_SRC_DIR)/src/interfaces/libpq -vpath % $(LIBPQ_SRC_DIR)/src/port -vpath % $(REP_DIR)/src/lib/libpq -vpath % $(LIBPQ_SRC_DIR)/src/backend/utils/mb -vpath % $(LIBPQ_SRC_DIR)/src/backend/libpq - - -LIBS += libc - -SHARED_LIB = yes - -CC_CXX_WARN_STRICT = diff --git a/lib/mk/libpqxx.mk b/lib/mk/libpqxx.mk deleted file mode 100644 index fddc51f..0000000 --- a/lib/mk/libpqxx.mk +++ /dev/null @@ -1,40 +0,0 @@ -include $(REP_DIR)/lib/import/import-libpqxx.mk - -LIBPQXX_PORT_DIR := $(call select_from_ports,libpqxx) -LIBPQXX_SRC_DIR := $(LIBPQXX_PORT_DIR)/src/lib/libpqxx - -# files -SRC_CC += binarystring.cpp\ - connection.cpp\ - connection_base.cpp\ - cursor.cpp\ - dbtransaction.cpp\ - errorhandler.cpp\ - except.cpp\ - field.cpp\ - largeobject.cpp\ - nontransaction.cpp\ - notification.cpp\ - notify-listen.cpp\ - pipeline.cpp\ - prepared_statement.cpp\ - result.cpp\ - robusttransaction.cpp\ - statement_parameters.cpp\ - strconv.cpp\ - subtransaction.cpp\ - tablereader.cpp\ - tablestream.cpp\ - tablewriter.cpp\ - transaction.cpp\ - transaction_base.cpp\ - tuple.cpp\ - util.cpp - -vpath % $(LIBPQXX_SRC_DIR)/src - -LIBS += libc stdcxx libpq - -SHARED_LIB = yes - -CC_CXX_WARN_STRICT = diff --git a/ports/libpqxx.hash b/ports/libpqxx.hash deleted file mode 100644 index b215c94..0000000 --- a/ports/libpqxx.hash +++ /dev/null @@ -1 +0,0 @@ -0a60a00a30f8e7931a5afa628a8c46b1f1731a12 diff --git a/ports/libpqxx.port b/ports/libpqxx.port deleted file mode 100644 index 954e0ad..0000000 --- a/ports/libpqxx.port +++ /dev/null @@ -1,19 +0,0 @@ -LICENSE := CUSTOM -DOWNLOADS := libpqxx.archive -VERSION := 4.0 - -URL(libpqxx) := http://pqxx.org/download/software/libpqxx/libpqxx-$(VERSION).tar.gz -SHA(libpqxx) := b160043289cfbf2a186d3b12f9976b6914e76d918d3d4469ff408bd199bbb8ed -DIR(libpqxx) := src/lib/libpqxx - -DIRS := include/pqxx -DIR_CONTENT(include/pqxx) := $(REP_DIR)/include/pqxx/*.h - - -SRC_FOLDERS := `pwd`$(call select_from_ports,libpqxx)/src/lib/libpqxx/src - -rename_files = cd $(SRC_FOLDERS); rename -v -f "s/\.cxx/\.cpp/" *.cxx - -default: $(DOWNLOADS) - @$(MSG_GENERATE) Fixing source file extensions - $(VERBOSE)$(call rename_files) diff --git a/run/libpq_create_db.run b/run/libpq_create_db.run deleted file mode 100644 index 19d5f12..0000000 --- a/run/libpq_create_db.run +++ /dev/null @@ -1,112 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpq/db_create -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - - -append boot_modules { - core init - timer - test-libpq_create - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpq_createdb_db.run b/run/libpq_createdb_db.run deleted file mode 100644 index 64e7bd3..0000000 --- a/run/libpq_createdb_db.run +++ /dev/null @@ -1,114 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpq/db_createdb -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -# The QtQuick plugin currently needs to be provided both in the file system -# (for Qt) and as ROM module (for 'dlopen()'). - -append boot_modules { - core init - timer - test-libpq_createdb - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpq_list_db.run b/run/libpq_list_db.run deleted file mode 100644 index 23b2206..0000000 --- a/run/libpq_list_db.run +++ /dev/null @@ -1,111 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpq/db_list -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -append boot_modules { - core init - timer - test-libpq_list_db - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpq_update_db.run b/run/libpq_update_db.run deleted file mode 100644 index be29d8d..0000000 --- a/run/libpq_update_db.run +++ /dev/null @@ -1,112 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpq/db_update -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - - -append boot_modules { - core init - timer - test-libpq_update - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpqxx_conection.run b/run/libpqxx_conection.run deleted file mode 100644 index 849aea5..0000000 --- a/run/libpqxx_conection.run +++ /dev/null @@ -1,112 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpqxx/conection_test -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -append boot_modules { - core init - timer - test-conection - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - libpqxx.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpqxx_creation_table.run b/run/libpqxx_creation_table.run deleted file mode 100644 index f43527c..0000000 --- a/run/libpqxx_creation_table.run +++ /dev/null @@ -1,112 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpqxx/creation_table -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -append boot_modules { - core init - timer - test-creation_table - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - libpqxx.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpqxx_delete_operation.run b/run/libpqxx_delete_operation.run deleted file mode 100644 index e9fc3e6..0000000 --- a/run/libpqxx_delete_operation.run +++ /dev/null @@ -1,112 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpqxx/delete_operation -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -append boot_modules { - core init - timer - test-delete_operation - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - libpqxx.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpqxx_insert_operation.run b/run/libpqxx_insert_operation.run deleted file mode 100644 index 54f3df7..0000000 --- a/run/libpqxx_insert_operation.run +++ /dev/null @@ -1,115 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpqxx/insert_operation -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -# The QtQuick plugin currently needs to be provided both in the file system -# (for Qt) and as ROM module (for 'dlopen()'). - -append boot_modules { - core init - timer - test-insert_operation - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - libpqxx.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpqxx_select_operation.run b/run/libpqxx_select_operation.run deleted file mode 100644 index ee2c384..0000000 --- a/run/libpqxx_select_operation.run +++ /dev/null @@ -1,112 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpqxx/select_operation -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -append boot_modules { - core init - timer - test-select_operation - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - libpqxx.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/run/libpqxx_update_operation.run b/run/libpqxx_update_operation.run deleted file mode 100644 index ad9e2d8..0000000 --- a/run/libpqxx_update_operation.run +++ /dev/null @@ -1,115 +0,0 @@ -# -# Build -# - -set build_components { - core - init - timer - test/libpqxx/update_operation -} - -lappend_if [have_spec usb] build_components drivers/usb -lappend_if [have_spec gpio] build_components drivers/gpio - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append_if [have_spec gpio] config { - - - - - } - -append config { - - - - - - - - } - -append config { - - - - - - - - - - - - - - - - -} - -install_config $config - -# -# Boot modules -# - -# The QtQuick plugin currently needs to be provided both in the file system -# (for Qt) and as ROM module (for 'dlopen()'). - -append boot_modules { - core init - timer - test-update_operation - ld.lib.so - libc.lib.so vfs.lib.so - libpq.lib.so - libpqxx.lib.so - lwip_legacy.lib.so - libm.lib.so - pthread.lib.so - stdcxx.lib.so -} - -lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -run_genode_until forever - diff --git a/src/lib/libpq/dummy_sig_method.c b/src/lib/libpq/dummy_sig_method.c deleted file mode 100644 index e843e84..0000000 --- a/src/lib/libpq/dummy_sig_method.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * \brief Dummy implementations - * \author Reinier Millo Sánchez - * \author Alexy Gallardo Segura - * \date 2015-11-15 - */ - -/* - * Copyright (C) 2015 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#include - -int sigpending(sigset_t *set) -{ - //*sig = SIGQUIT; - return 0; -} - - -int sigwait(const sigset_t *set, int *sig) -{ - *sig = SIGQUIT; - return 0; -} - - diff --git a/src/test/libpq/db_create/main.cc b/src/test/libpq/db_create/main.cc deleted file mode 100644 index d5466f0..0000000 --- a/src/test/libpq/db_create/main.cc +++ /dev/null @@ -1,121 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL C tutorial" on the url next. -* URL=http://zetcode.com/db/postgresqlc/ -*/ - -#include -#include -#include - -void do_exit(PGconn *conn, PGresult *res) { - - fprintf(stderr, "%s\n", PQerrorMessage(conn)); - - PQclear(res); - PQfinish(conn); - - exit(1); -} - -int main(int argc, char **argv) { - const char *conninfo; - - if (argc > 0) - conninfo = argv[0]; - else - conninfo = "dbname=postgres"; - - PGconn *conn = PQconnectdb(conninfo); - - if (PQstatus(conn) == CONNECTION_BAD) { - - fprintf(stderr, "Connection to database failed: %s\n", - PQerrorMessage(conn)); - - PQfinish(conn); - exit(1); - } - - PGresult *res = PQexec(conn, "DROP TABLE IF EXISTS Cars"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "CREATE TABLE Cars(Id INTEGER PRIMARY KEY," \ - "Name VARCHAR(20), Price INT)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(1,'Audi',52642)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) - do_exit(conn, res); - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(2,'Mercedes',57127)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(3,'Skoda',9000)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(4,'Volvo',29000)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(5,'Bentley',350000)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(6,'Citroen',21000)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(7,'Hummer',41400)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - - res = PQexec(conn, "INSERT INTO Cars VALUES(8,'Volkswagen',21600)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - PQfinish(conn); - - return 0; -} diff --git a/src/test/libpq/db_create/target.mk b/src/test/libpq/db_create/target.mk deleted file mode 100644 index 376da38..0000000 --- a/src/test/libpq/db_create/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-libpq_create -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpq/db_createdb/main.cc b/src/test/libpq/db_createdb/main.cc deleted file mode 100644 index 488e84d..0000000 --- a/src/test/libpq/db_createdb/main.cc +++ /dev/null @@ -1,49 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL C tutorial" on the url next. -* URL=http://zetcode.com/db/postgresqlc/ -*/ - -#include -#include -#include - -void do_exit(PGconn *conn, PGresult *res) { - - fprintf(stderr, "%s\n", PQerrorMessage(conn)); - - PQclear(res); - PQfinish(conn); - - exit(1); -} - -int main(int argc, char **argv) { - const char *conninfo; - - if (argc > 0) - conninfo = argv[0]; - else - conninfo = "dbname=postgres"; - - PGconn *conn = PQconnectdb(conninfo); - - if (PQstatus(conn) == CONNECTION_BAD) { - - fprintf(stderr, "Connection to database failed: %s\n", - PQerrorMessage(conn)); - - PQfinish(conn); - exit(1); - } - - PGresult *res = PQexec(conn, "CREATE DATABASE baseDBTest;"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - do_exit(conn, res); - } - - PQclear(res); - PQfinish(conn); - - return 0; -} diff --git a/src/test/libpq/db_createdb/target.mk b/src/test/libpq/db_createdb/target.mk deleted file mode 100644 index 754f696..0000000 --- a/src/test/libpq/db_createdb/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-libpq_createdb -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpq/db_list/main.cc b/src/test/libpq/db_list/main.cc deleted file mode 100644 index d9f4db6..0000000 --- a/src/test/libpq/db_list/main.cc +++ /dev/null @@ -1,129 +0,0 @@ -/* - * testlibpq.c - * - * Test the C version of libpq, the PostgreSQL frontend library. - * - * This example is taken of official documentation web of Postgres for using libpq. - * - * URL=http://www.postgresql.org/docs/9.1/static/libpq-example.html - */ - -#include - -#include -#include -#include - - -static void -exit_nicely(PGconn *conn) -{ - PQfinish(conn); - exit(1); -} - -int -main(int argc, char **argv) -{ - const char *conninfo; - PGconn *conn; - PGresult *res; - int nFields; - int i, - j; - - /* - * If the user supplies a parameter on the command line, use it as the - * conninfo string; otherwise default to setting dbname=postgres and using - * environment variables or defaults for all other connection parameters. - */ - if (argc > 0) - conninfo = argv[0]; - else - conninfo = "dbname=postgres"; - - /* Make a connection to the database */ - conn = PQconnectdb(conninfo); - - /* Check to see that the backend connection was successfully made */ - if (PQstatus(conn) != CONNECTION_OK) - { - fprintf(stderr, "Connection to database failed: %s", - PQerrorMessage(conn)); - exit_nicely(conn); - } - - - /* - * Our test case here involves using a cursor, for which we must be inside - * a transaction block. We could do the whole thing with a single - * PQexec() of "select * from pg_database", but that's too trivial to make - * a good example. - */ - - /* Start a transaction block */ - res = PQexec(conn, "BEGIN"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) - { - fprintf(stderr, "BEGIN command failed: %s", PQerrorMessage(conn)); - PQclear(res); - exit_nicely(conn); - } - - /* - * Should PQclear PGresult whenever it is no longer needed to avoid memory - * leaks - */ - - PQclear(res); - - - /* - * Fetch rows from pg_database, the system catalog of databases - */ - res = PQexec(conn, "DECLARE myportal CURSOR FOR select * from pg_database"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) - { - fprintf(stderr, "DECLARE CURSOR failed: %s", PQerrorMessage(conn)); - PQclear(res); - exit_nicely(conn); - } - PQclear(res); - - res = PQexec(conn, "FETCH ALL in myportal"); - if (PQresultStatus(res) != PGRES_TUPLES_OK) - { - fprintf(stderr, "FETCH ALL failed: %s", PQerrorMessage(conn)); - PQclear(res); - exit_nicely(conn); - } - - /* first, print out the attribute names */ - nFields = PQnfields(res); - for (i = 0; i < nFields; i++) - printf("%-15s", PQfname(res, i)); - printf("\n\n"); - - /* next, print out the rows */ - for (i = 0; i < PQntuples(res); i++) - { - for (j = 0; j < nFields; j++) - printf("%-15s", PQgetvalue(res, i, j)); - printf("\n"); - } - - PQclear(res); - - /* close the portal ... we don't bother to check for errors ... */ - res = PQexec(conn, "CLOSE myportal"); - PQclear(res); - - /* end the transaction */ - res = PQexec(conn, "END"); - PQclear(res); - - /* close the connection to the database and cleanup */ - PQfinish(conn); - - return 0; -} diff --git a/src/test/libpq/db_list/target.mk b/src/test/libpq/db_list/target.mk deleted file mode 100644 index 021459e..0000000 --- a/src/test/libpq/db_list/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-libpq_list_db -SRC_CC = main.cc -LIBS += base stdcxx lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libpq libc config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpq/db_update/main.cc b/src/test/libpq/db_update/main.cc deleted file mode 100644 index 9700977..0000000 --- a/src/test/libpq/db_update/main.cc +++ /dev/null @@ -1,77 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL C tutorial" on the url next. -* URL=http://zetcode.com/db/postgresqlc/ -*/ - -#include -#include -#include - -void do_exit(PGconn *conn) { - - PQfinish(conn); - exit(1); -} - -int main(int argc, char **argv) { - const char *conninfo; - - if (argc > 0) - conninfo = argv[0]; - else - conninfo = "dbname=postgres"; - - PGconn *conn = PQconnectdb(conninfo); - - if (PQstatus(conn) == CONNECTION_BAD) { - - fprintf(stderr, "Connection to database failed: %s\n", - PQerrorMessage(conn)); - - PQfinish(conn); - exit(1); - } - - PGresult *res = PQexec(conn, "BEGIN"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - - printf("BEGIN command failed\n"); - PQclear(res); - do_exit(conn); - } - - PQclear(res); - - res = PQexec(conn, "UPDATE Cars SET Price=23700 WHERE Id=8"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - - printf("UPDATE command failed\n"); - PQclear(res); - do_exit(conn); - } - - res = PQexec(conn, "INSERT INTO Cars VALUES(9,'Mazda',27770)"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - - printf("INSERT command failed\n"); - PQclear(res); - do_exit(conn); - } - - res = PQexec(conn, "COMMIT"); - - if (PQresultStatus(res) != PGRES_COMMAND_OK) { - - printf("COMMIT command failed\n"); - PQclear(res); - do_exit(conn); - } - - PQclear(res); - PQfinish(conn); - - return 0; -} diff --git a/src/test/libpq/db_update/target.mk b/src/test/libpq/db_update/target.mk deleted file mode 100644 index 3bc3be6..0000000 --- a/src/test/libpq/db_update/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-libpq_update -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpqxx/conection_test/main.cc b/src/test/libpqxx/conection_test/main.cc deleted file mode 100644 index c9085ea..0000000 --- a/src/test/libpqxx/conection_test/main.cc +++ /dev/null @@ -1,40 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL - C/C++ Interface" on the url next. -* URL=http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm -*/ - -#include -#include - -#include - -using namespace std; -using namespace pqxx; - -int main() -{ - - try{ - - connection C("dbname=postgres user=postgres password=ok \ - hostaddr=10.12.119.178 port=5432"); - - if (C.is_open()) { - cout << "Opened database successfully: " << C.dbname() << endl; - } else { - cout << "Can't open database" << endl; - return 1; - } - Timer::Connection timer; - timer.usleep(100000); - - - C.disconnect (); - - }catch (const std::exception &e){ - cerr << e.what() << std::endl; - return 1; - } - - return 0; -} diff --git a/src/test/libpqxx/conection_test/target.mk b/src/test/libpqxx/conection_test/target.mk deleted file mode 100644 index 8670751..0000000 --- a/src/test/libpqxx/conection_test/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-conection -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq libpqxx config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpqxx/creation_table/main.cc b/src/test/libpqxx/creation_table/main.cc deleted file mode 100644 index cd19128..0000000 --- a/src/test/libpqxx/creation_table/main.cc +++ /dev/null @@ -1,52 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL - C/C++ Interface" on the url next. -* URL=http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm -*/ - -#include -#include - -using namespace std; -using namespace pqxx; - -int main(int argc, char* argv[]) -{ - char * sql; - - try{ - connection C("dbname=testdb user=postgres password=ok \ - hostaddr=10.12.119.178 port=5432"); - - if (C.is_open()) { - cout << "Opened database successfully: " << C.dbname() << endl; - } else { - cout << "Can't open database" << endl; - return 1; - } - - /* Create SQL statement */ - sql = "CREATE TABLE COMPANY(" \ - "ID INT PRIMARY KEY NOT NULL," \ - "NAME TEXT NOT NULL," \ - "AGE INT NOT NULL," \ - "ADDRESS CHAR(50)," \ - "SALARY REAL );"; - - /* Create a transactional object. */ - work W(C); - - /* Execute SQL query */ - W.exec( sql ); - W.commit(); - cout << "Table created successfully" << endl; - - C.disconnect (); - - }catch (const std::exception &e){ - cerr << e.what() << std::endl; - return 1; - } - - return 0; - -} diff --git a/src/test/libpqxx/creation_table/target.mk b/src/test/libpqxx/creation_table/target.mk deleted file mode 100644 index 7da9694..0000000 --- a/src/test/libpqxx/creation_table/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-creation_table -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq libpqxx config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpqxx/delete_operation/main.cc b/src/test/libpqxx/delete_operation/main.cc deleted file mode 100644 index a461963..0000000 --- a/src/test/libpqxx/delete_operation/main.cc +++ /dev/null @@ -1,62 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL - C/C++ Interface" on the url next. -* URL=http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm -*/ - -#include -#include - -using namespace std; -using namespace pqxx; - -int main(int argc, char* argv[]) -{ - char * sql; - - try{ - connection C("dbname=testdb user=postgres password=ok \ - hostaddr=10.12.119.178 port=5432"); - - if (C.is_open()) { - cout << "Opened database successfully: " << C.dbname() << endl; - } else { - cout << "Can't open database" << endl; - return 1; - } - - /* Create a transactional object. */ - work W(C); - /* Create SQL DELETE statement */ - sql = "DELETE from COMPANY where ID = 2"; - /* Execute SQL query */ - W.exec( sql ); - W.commit(); - cout << "Records deleted successfully" << endl; - - /* Create SQL SELECT statement */ - sql = "SELECT * from COMPANY"; - - /* Create a non-transactional object. */ - nontransaction N(C); - - /* Execute SQL query */ - result R( N.exec( sql )); - - /* List down all the records */ - for (result::const_iterator c = R.begin(); c != R.end(); ++c) { - cout << "ID = " << c[0].as() << endl; - cout << "Name = " << c[1].as() << endl; - cout << "Age = " << c[2].as() << endl; - cout << "Address = " << c[3].as() << endl; - cout << "Salary = " << c[4].as() << endl; - } - cout << "Operation done successfully" << endl; - C.disconnect (); - - }catch (const std::exception &e){ - cerr << e.what() << std::endl; - return 1; - } - - return 0; -} diff --git a/src/test/libpqxx/delete_operation/target.mk b/src/test/libpqxx/delete_operation/target.mk deleted file mode 100644 index 3340834..0000000 --- a/src/test/libpqxx/delete_operation/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-delete_operation -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq libpqxx config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpqxx/insert_operation/main.cc b/src/test/libpqxx/insert_operation/main.cc deleted file mode 100644 index 164f355..0000000 --- a/src/test/libpqxx/insert_operation/main.cc +++ /dev/null @@ -1,53 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL - C/C++ Interface" on the url next. -* URL=http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm -*/ - -#include -#include - -using namespace std; -using namespace pqxx; - -int main(int argc, char* argv[]) -{ - char * sql; - - try{ - connection C("dbname=testdb user=postgres password=ok \ - hostaddr=10.12.119.178 port=5432"); - - if (C.is_open()) { - cout << "Opened database successfully: " << C.dbname() << endl; - } else { - cout << "Can't open database" << endl; - return 1; - } - - /* Create SQL statement */ - sql = "INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) " \ - "VALUES (1, 'Paul', 32, 'California', 20000.00 ); " \ - "INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) " \ - "VALUES (2, 'Allen', 25, 'Texas', 15000.00 ); " \ - "INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY)" \ - "VALUES (3, 'Teddy', 23, 'Norway', 20000.00 );" \ - "INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY)" \ - "VALUES (4, 'Mark', 25, 'Rich-Mond ', 65000.00 );"; - - /* Create a transactional object. */ - work W(C); - - /* Execute SQL query */ - W.exec( sql ); - W.commit(); - cout << "Records created successfully" << endl; - - C.disconnect (); - - }catch (const std::exception &e){ - cerr << e.what() << std::endl; - return 1; - } - - return 0; -} diff --git a/src/test/libpqxx/insert_operation/target.mk b/src/test/libpqxx/insert_operation/target.mk deleted file mode 100644 index 2f2da1c..0000000 --- a/src/test/libpqxx/insert_operation/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-insert_operation -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq libpqxx config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpqxx/select_operation/main.cc b/src/test/libpqxx/select_operation/main.cc deleted file mode 100644 index 229df31..0000000 --- a/src/test/libpqxx/select_operation/main.cc +++ /dev/null @@ -1,55 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL - C/C++ Interface" on the url next. -* URL=http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm -*/ - -#include -#include - -using namespace std; -using namespace pqxx; - -int main(int argc, char* argv[]) -{ - char * sql; - - try{ - connection C("dbname=testdb user=postgres password=ok \ - hostaddr=10.12.119.178 port=5432"); - - if (C.is_open()) { - cout << "Opened database successfully: " << C.dbname() << endl; - } else { - cout << "Can't open database" << endl; - return 1; - } - - /* Create SQL statement */ - sql = "SELECT * from COMPANY"; - - /* Create a non-transactional object. */ - nontransaction N(C); - - /* Execute SQL query */ - result R( N.exec( sql )); - - /* List down all the records */ - for (result::const_iterator c = R.begin(); c != R.end(); ++c) { - cout << "ID = " << c[0].as() << endl; - cout << "Name = " << c[1].as() << endl; - cout << "Age = " << c[2].as() << endl; - cout << "Address = " << c[3].as() << endl; - cout << "Salary = " << c[4].as() << endl; - } - - cout << "Operation done successfully" << endl; - - C.disconnect (); - - }catch (const std::exception &e){ - cerr << e.what() << std::endl; - return 1; - } - - return 0; -} diff --git a/src/test/libpqxx/select_operation/target.mk b/src/test/libpqxx/select_operation/target.mk deleted file mode 100644 index badef0e..0000000 --- a/src/test/libpqxx/select_operation/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-select_operation -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq libpqxx config_args - -CC_CXX_WARN_STRICT = diff --git a/src/test/libpqxx/update_operation/main.cc b/src/test/libpqxx/update_operation/main.cc deleted file mode 100644 index a45a0af..0000000 --- a/src/test/libpqxx/update_operation/main.cc +++ /dev/null @@ -1,61 +0,0 @@ -/** -* This example was taken of the article "PostgreSQL - C/C++ Interface" on the url next. -* URL=http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm -*/ - -#include -#include - -using namespace std; -using namespace pqxx; - -int main(int argc, char* argv[]) -{ - char * sql; - - try{ - connection C("dbname=testdb user=postgres password=ok \ - hostaddr=10.12.119.178 port=5432"); - if (C.is_open()) { - cout << "Opened database successfully: " << C.dbname() << endl; - } else { - cout << "Can't open database" << endl; - return 1; - } - - /* Create a transactional object. */ - work W(C); - /* Create SQL UPDATE statement */ - sql = "UPDATE COMPANY set SALARY = 25000.00 where ID=1"; - /* Execute SQL query */ - W.exec( sql ); - W.commit(); - cout << "Records updated successfully" << endl; - - /* Create SQL SELECT statement */ - sql = "SELECT * from COMPANY"; - - /* Create a non-transactional object. */ - nontransaction N(C); - - /* Execute SQL query */ - result R( N.exec( sql )); - - /* List down all the records */ - for (result::const_iterator c = R.begin(); c != R.end(); ++c) { - cout << "ID = " << c[0].as() << endl; - cout << "Name = " << c[1].as() << endl; - cout << "Age = " << c[2].as() << endl; - cout << "Address = " << c[3].as() << endl; - cout << "Salary = " << c[4].as() << endl; - } - cout << "Operation done successfully" << endl; - C.disconnect (); - - }catch (const std::exception &e){ - cerr << e.what() << std::endl; - return 1; - } - - return 0; -} diff --git a/src/test/libpqxx/update_operation/target.mk b/src/test/libpqxx/update_operation/target.mk deleted file mode 100644 index d2c8f9f..0000000 --- a/src/test/libpqxx/update_operation/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = test-update_operation -SRC_CC = main.cc -LIBS += base stdcxx libc-net lwip libc_lwip libc_lwip_nic_dhcp libc_lwip_loopback libc libpq libpqxx config_args - -CC_CXX_WARN_STRICT =