From 551eeb548345fd60ae1b5ff90f033c29ba85a53d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 29 Sep 2000 13:35:26 +0000 Subject: [PATCH] Cygwin uses _sys_nerr for sys_nerr --- src/backend/utils/error/elog.c | 4 ++++ src/backend/utils/error/exc.c | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 826faa9d94..c30471d74c 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -38,6 +38,10 @@ #include "commands/copy.h" extern int errno; + +#ifdef __CYGWIN__ +# define sys_nerr _sys_nerr +#endif extern int sys_nerr; extern CommandDest whereToSendOutput; diff --git a/src/backend/utils/error/exc.c b/src/backend/utils/error/exc.c index b6b9272879..0ee8e1e9ce 100644 --- a/src/backend/utils/error/exc.c +++ b/src/backend/utils/error/exc.c @@ -16,10 +16,10 @@ * *------------------------------------------------------------------------- */ -#include - #include "postgres.h" +#include + #include "storage/ipc.h" #include "utils/exc.h" @@ -94,15 +94,19 @@ EnableExceptionHandling(bool on) ExceptionHandlingEnabled = on; } + +extern int errno; +#ifdef __CYGWIN__ +# define sys_nerr _sys_nerr +#endif +extern int sys_nerr; + static void ExcPrint(Exception *excP, ExcDetail detail, ExcData data, ExcMessage message) { - extern int errno; - extern int sys_nerr; - #ifdef lint data = data; #endif -- 2.39.5