PgSQL 8.0.0 beta1 compile problem + patch
От | Nikola Milutinovic |
---|---|
Тема | PgSQL 8.0.0 beta1 compile problem + patch |
Дата | |
Msg-id | 411B4E48.2000703@ev.co.yu обсуждение исходный текст |
Ответы |
Re: PgSQL 8.0.0 beta1 compile problem + patch
|
Список | pgsql-general |
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);
В списке pgsql-general по дате отправления: