Re: PgSQL 8.0.0 beta1 compile problem + patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Nikola Milutinovic <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu>
Cc: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PgSQL 8.0.0 beta1 compile problem + patch
Date: 2004-08-12 13:30:11
Message-ID: 200408121330.i7CDUBw13269@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Yea, we just fixed that. Thanks.

---------------------------------------------------------------------------

Nikola Milutinovic wrote:
> Hi all.
>
> Ran into a minor showstopper. Sometimes, my CC is just too much of a
> nitpick, but on this matter, I agree with it. "./src/timezone/zic.c" has
> a mismatch in declaration and definition of "memcheck(...)" function. My
> CC beltched on it (I was running it in strict ANSI mode). The diference
> is this:
>
> static char *memcheck(char *tocheck);
> ...
> /*
> * Memory allocation.
> */
>
> static char *
> memcheck(ptr)
> char *const ptr;
> {
> if (ptr == NULL)
> {
> const char *e = strerror(errno);
>
> (void) fprintf(stderr, _("%s: Memory exhausted: %s\n"),
> progname, e);
> (void) exit(EXIT_FAILURE);
> }
> return ptr;
> }
>
> Notice "char *const ptr". Trusting that the lower definition is correct,
> being more strict and closer to the actual code, I have changed the uper
> declaration to match. I have attached a patch.
>
> Nix.

> *** src/timezone/zic.c.orig Thu Aug 12 12:44:44 2004
> --- src/timezone/zic.c Thu Aug 12 12:45:05 2004
> ***************
> *** 134,140 ****
> static int itsabbr(const char *abbr, const char *word);
> static int itsdir(const char *name);
> static int lowerit(int c);
> ! static char *memcheck(char *tocheck);
> static int mkdirs(char *filename);
> static void newabbr(const char *abbr);
> static long oadd(long t1, long t2);
> --- 134,140 ----
> static int itsabbr(const char *abbr, const char *word);
> static int itsdir(const char *name);
> static int lowerit(int c);
> ! static char *memcheck(char *const tocheck);
> static int mkdirs(char *filename);
> static void newabbr(const char *abbr);
> static long oadd(long t1, long t2);

>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2004-08-12 13:33:45 Re: Performance critical technical key
Previous Message Paramveer.Singh 2004-08-12 13:28:47 pl pgsql grammer file contains error