Skip to content

Commit f6e00ae

Browse files
committed
Further MSVC portability fixes from Magnus.
1 parent 6bc1f9b commit f6e00ae

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

contrib/earthdistance/earthdistance.c

Lines 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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy