Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:37 AM
Nikola Milutinovic
Guest
 
Posts: n/a
Default PgSQL 8.0.0 beta1 compile problem + patch

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

  #2  
Old November 23rd, 2005, 01:37 AM
Bruce Momjian
Guest
 
Posts: n/a
Default Re: PgSQL 8.0.0 beta1 compile problem + patch


Yea, we just fixed that. Thanks.

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

Nikola Milutinovic wrote:[color=blue]
> 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.[/color]
[color=blue]
> *** 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);[/color]
[color=blue]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings[/color]

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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles