Mercurial > hg > orthanc-databases
annotate Framework/PostgreSQL/PostgreSQLIncludes.h @ 303:495b6f325e35
GenericFormatter::SetNamedDialect()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 09 Jul 2021 16:46:50 +0200 |
parents | 3236894320d6 |
children | 16aac0287485 |
rev | line source |
---|---|
103 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
193
3236894320d6
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
177
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
103 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
108 | 24 // These includes are necessary for compilation on OS X |
25 #include <unistd.h> | |
26 #include <vector> | |
27 #include <map> | |
28 #include <cmath> | |
152 | 29 #include <Enumerations.h> |
108 | 30 |
177
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
31 // Get "ntohl()" defined |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
32 #if defined(_WIN32) |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
33 # include <winsock.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
34 #else |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
35 # include <arpa/inet.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
36 #endif |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
37 |
103 | 38 // PostgreSQL includes |
39 #include <pg_config.h> | |
40 | |
172
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
41 #if !defined(PG_VERSION_NUM) |
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
42 # error PG_VERSION_NUM is not defined |
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
43 #endif |
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
44 |
177
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
45 #if PG_VERSION_NUM >= 110000 |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
46 # include <catalog/pg_type_d.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
47 #else |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
48 # include <postgres.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
49 # undef LOG // This one comes from <postgres.h>, and conflicts with <Core/Logging.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
50 # include <catalog/pg_type.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
51 #endif |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
52 |
103 | 53 #include <libpq-fe.h> |