Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6e00ae

Browse filesBrowse files
committed
Further MSVC portability fixes from Magnus.
1 parent 6bc1f9b commit f6e00ae
Copy full SHA for f6e00ae

File tree

Expand file treeCollapse file tree

2 files changed

+18
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+18
-2
lines changed

‎contrib/earthdistance/earthdistance.c

Copy file name to clipboardExpand all lines: contrib/earthdistance/earthdistance.c
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
/* $PostgreSQL: pgsql/contrib/earthdistance/earthdistance.c,v 1.11 2006/05/30 22:12:12 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/earthdistance/earthdistance.c,v 1.12 2006/10/19 20:03:07 tgl Exp $ */
22

33
#include "postgres.h"
44

5+
#ifdef WIN32
6+
#define _USE_MATH_DEFINES
7+
#endif
58
#include <math.h>
69

710
#include "utils/geo_decls.h" /* for Pt */

‎src/include/port/win32.h

Copy file name to clipboardExpand all lines: src/include/port/win32.h
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.62 2006/10/04 00:30:10 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.63 2006/10/19 20:03:08 tgl Exp $ */
22

33
#if defined(_MSC_VER) || defined(__BORLANDC__)
44
#define WIN32_ONLY_COMPILER
@@ -289,6 +289,19 @@ typedef unsigned short mode_t;
289289
#define isnan(x) _isnan(x)
290290
#define finite(x) _finite(x)
291291

292+
#ifndef BIG_ENDIAN
293+
#define BIG_ENDIAN 4321
294+
#endif
295+
#ifndef LITTLE_ENDIAN
296+
#define LITTLE_ENDIAN 1234
297+
#endif
298+
#ifndef PDP_ENDIAN
299+
#define PDP_ENDIAN 3412
300+
#endif
301+
302+
#ifndef BYTE_ORDER
303+
#define BYTE_ORDER LITTLE_ENDIAN
304+
#endif
292305

293306
/* Pulled from Makefile.port in mingw */
294307
#define DLSUFFIX ".dll"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.