Thread: BUG??, fault in POSTMASTER when using GMAKE

BUG??, fault in POSTMASTER when using GMAKE

From
"DECC"
Date:
hello there,

i must say i'm a rookie at using unix, but when i was trying to install pos=
tgresql 7.1,
i came up with the following problem in the POSTMASTER program section. Cou=
ld you, the reader of this message, please tell me what or where i can do/g=
o to solve this problem. This is what the output was after running the inst=
allation:

gcc2 -O2 -pipe -m486 -Wall -Wmissing-prototypes -Wmissing-declarations -I..=
/../.
./src/include   -c postmaster.c -o postmaster.o
postmaster.c: In function `PostmasterMain':
postmaster.c:406: `optreset' undeclared (first use this function)
postmaster.c:406: (Each undeclared identifier is reported only once
postmaster.c:406: for each function it appears in.)
gmake: *** [postmaster.o] Error 1

The rest of posgresql seemed to be installed without any problem. It might =
be due to some mistake i made, if so, don't be angry with me, just let me k=
now.

thanx-a-lot,

Dagomar

Re: BUG??, fault in POSTMASTER when using GMAKE

From
Tom Lane
Date:
"DECC" <info@decc.nl> writes:
> gcc2 -O2 -pipe -m486 -Wall -Wmissing-prototypes -Wmissing-declarations -I..=
> /../.
> ./src/include   -c postmaster.c -o postmaster.o
> postmaster.c: In function `PostmasterMain':
> postmaster.c:406: `optreset' undeclared (first use this function)

Hm.  It looks like configure is testing whether it can link
  extern int optreset; optreset = 1;
but then postmaster.c tries to get away without the extern.  One or
the other of these things needs to change.  Peter, you got an opinion
about it?

BTW, info@decc.nl, what platform are you using?

            regards, tom lane

Re: BUG??, fault in POSTMASTER when using GMAKE

From
Peter Eisentraut
Date:
Tom Lane writes:

> Hm.  It looks like configure is testing whether it can link
>   extern int optreset; optreset = 1;
> but then postmaster.c tries to get away without the extern.  One or
> the other of these things needs to change.  Peter, you got an opinion
> about it?

Correctly diagnosed, but I can't get at the code because the cvs server is
down.

> BTW, info@decc.nl, what platform are you using?

Probably something BSDish.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter

Re: BUG??, fault in POSTMASTER when using GMAKE

From
Peter Eisentraut
Date:
DECC writes:

> gcc2 -O2 -pipe -m486 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.
> ./src/include   -c postmaster.c -o postmaster.o
> postmaster.c: In function `PostmasterMain':
> postmaster.c:406: `optreset' undeclared (first use this function)
> postmaster.c:406: (Each undeclared identifier is reported only once
> postmaster.c:406: for each function it appears in.)
> gmake: *** [postmaster.o] Error 1

I have installed the below patch into CVS.  You can apply it to your
sources or obtain a new snapshot tarball tomorrow, or wait for the 7.1.1
release in 1-2 weeks.

===================================================================
RCS file:
/home/projects/pgsql/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.211
diff -c -r1.211 postmaster.c
*** postmaster.c        2001/03/22 03:59:43     1.211
--- postmaster.c        2001/04/19 19:06:34
***************
*** 211,216 ****
--- 211,219 ----
  extern char *optarg;
  extern int    optind,
                        opterr;
+ #ifdef HAVE_INT_OPTRESET
+ extern int    optreset;
+ #endif

  /*
   * postmaster.c - function prototypes
===END

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter