Skip to content

Commit 178ec6f

Browse files
committed
Fix function definition that somehow missed being ANSI-fied, and align
it with previous prototype to suppress complaints from picky compilers, per report from Scott Bailey. Also, remove substitute strerror definition --- not needed, since we link this with libpgport.
1 parent 81cca21 commit 178ec6f

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/timezone/zic.c

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/timezone/zic.c,v 1.10 2004/08/08 05:19:44 momjian Exp $
6+
* $PostgreSQL: pgsql/src/timezone/zic.c,v 1.11 2004/08/11 16:53:28 tgl Exp $
77
*/
88

99
#include "postgres.h"
@@ -152,10 +152,6 @@ static void usage(void);
152152
static void writezone(const char *name);
153153
static int yearistype(int year, const char *type);
154154

155-
#ifndef HAVE_STRERROR
156-
static char *strerror(int);
157-
#endif
158-
159155
static int charcnt;
160156
static int errors;
161157
static const char *filename;
@@ -375,8 +371,7 @@ static char roll[TZ_MAX_LEAPS];
375371
*/
376372

377373
static char *
378-
memcheck(ptr)
379-
char *const ptr;
374+
memcheck(char *ptr)
380375
{
381376
if (ptr == NULL)
382377
{
@@ -398,18 +393,6 @@ char *const ptr;
398393
* Error handling.
399394
*/
400395

401-
#ifndef HAVE_STRERROR
402-
static char *
403-
strerror(int errnum)
404-
{
405-
extern char *sys_errlist[];
406-
extern int sys_nerr;
407-
408-
return (errnum > 0 && errnum <= sys_nerr) ?
409-
sys_errlist[errnum] : _("Unknown system error");
410-
}
411-
#endif
412-
413396
static void
414397
eats(const char *name, const int num, const char *rname, const int rnum)
415398
{

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