build fixes

Поиск
Список
Период
Сортировка
Искать

build fixes

От:
Liam Stewart <liams@redhat.com>
Дата:
Вложения:

Here is a patch that fixes a couple of dumb bugs that cause builds to
fail.

Liam

-- 
Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

Re: build fixes

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> 
> Here is a patch that fixes a couple of dumb bugs that cause builds to
> fail.
> 
> Liam
> 
> -- 
> Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

OK, I fixed the first one with:

        snprintf(PQerrormsg, PQERRORMSG_LENGTH,
             "ident_unix: unknown local user with uid %d\n", peercred.uid);
                                                           ^^^^^^^^^^^^^^^

I missed that one because I don't have SO_PEERCRED here.

In the following patch, is it correct to make ECPGd_cardinality = 1 or
should it be put at the end of the list?


Index: src/interfaces/ecpg/include/ecpgtype.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/ecpg/include/ecpgtype.h,v
retrieving revision 1.18
diff -c -r1.18 ecpgtype.h
*** src/interfaces/ecpg/include/ecpgtype.h	2001/03/29 09:59:00	1.18
--- src/interfaces/ecpg/include/ecpgtype.h	2001/08/21 13:54:47
***************
*** 52,58 ****
  	/* descriptor items */
  	enum ECPGdtype
  	{
! 		ECPGd_count = 1,
  		ECPGd_data,
  		ECPGd_di_code,
  		ECPGd_di_precision,
--- 52,59 ----
  	/* descriptor items */
  	enum ECPGdtype
  	{
! 		ECPGd_cardinality = 1,
! 		ECPGd_count,
  		ECPGd_data,
  		ECPGd_di_code,
  		ECPGd_di_precision,

--yrj/dFKFPuw6o+aM
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

--yrj/dFKFPuw6o+aM--


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: build fixes

От:
Liam Stewart <liams@redhat.com>
Дата:
On Tue, Aug 21, 2001 at 10:47:41AM -0400, Bruce Momjian wrote:
> OK, I fixed the first one with:
> 
>         snprintf(PQerrormsg, PQERRORMSG_LENGTH,
>              "ident_unix: unknown local user with uid %d\n", peercred.uid);
>                                                            ^^^^^^^^^^^^^^^

Whoops..you can tell I was just trying to get a clean build..

> In the following patch, is it correct to make ECPGd_cardinality = 1 or
> should it be put at the end of the list?

Well, I just maintained the alphabetical ordering there. Unless there's
code that depends on the specific integer values of the enumerations, it
shouldn't make a difference. Next time I'll just submit a bug to hackers
instead of delving into code I don't know all that well.

Liam

-- 
Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

Re: build fixes

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Liam Stewart writes:

> Here is a patch that fixes a couple of dumb bugs that cause builds to
> fail.

>                 snprintf(PQerrormsg, PQERRORMSG_LENGTH,
> !                        "ident_unix: unknown local user with uid %d\n"),
>                 fputs(PQerrormsg, stderr);

We generally put semicolons at the end in C. ;-)

>         /* descriptor items */
>         enum ECPGdtype
>         {
> !               ECPGd_count = 1,
>                 ECPGd_data,
>                 ECPGd_di_code,
>                 ECPGd_di_precision,
> --- 52,59 ----
>         /* descriptor items */
>         enum ECPGdtype
>         {
> !               ECPGd_cardinality = 1,
> !               ECPGd_count,
>                 ECPGd_data,
>                 ECPGd_di_code,
>                 ECPGd_di_precision,

Put it at the end unless you want to deal with binary incompatibilities.

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

Re: build fixes

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> On Tue, Aug 21, 2001 at 10:47:41AM -0400, Bruce Momjian wrote:
> > OK, I fixed the first one with:
> > 
> >         snprintf(PQerrormsg, PQERRORMSG_LENGTH,
> >              "ident_unix: unknown local user with uid %d\n", peercred.uid);
> >                                                            ^^^^^^^^^^^^^^^
> 
> Whoops..you can tell I was just trying to get a clean build..

Great.  No problem.

> > In the following patch, is it correct to make ECPGd_cardinality = 1 or
> > should it be put at the end of the list?
> 
> Well, I just maintained the alphabetical ordering there. Unless there's
> code that depends on the specific integer values of the enumerations, it
> shouldn't make a difference. Next time I'll just submit a bug to hackers
> instead of delving into code I don't know all that well.

I found ecpg failing on my machine too.  I put it near the end, just in
case something needs that first entry to be 1.  In fact, they numbered
the first one, which I think means it mean something.  They have some
marker at the end so I wonder is they use that for something too.  I put
it right before the marker at the end.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: build fixes

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> Liam Stewart writes:
> 
> > Here is a patch that fixes a couple of dumb bugs that cause builds to
> > fail.
> 
> >                 snprintf(PQerrormsg, PQERRORMSG_LENGTH,
> > !                        "ident_unix: unknown local user with uid %d\n"),
> >                 fputs(PQerrormsg, stderr);
> 
> We generally put semicolons at the end in C. ;-)

Yea, I guess so.  :-)  Actually, we needed a uid parameter which I added
too.


> 
> >         /* descriptor items */
> >         enum ECPGdtype
> >         {
> > !               ECPGd_count = 1,
> >                 ECPGd_data,
> >                 ECPGd_di_code,
> >                 ECPGd_di_precision,
> > --- 52,59 ----
> >         /* descriptor items */
> >         enum ECPGdtype
> >         {
> > !               ECPGd_cardinality = 1,
> > !               ECPGd_count,
> >                 ECPGd_data,
> >                 ECPGd_di_code,
> >                 ECPGd_di_precision,
> 
> Put it at the end unless you want to deal with binary incompatibilities.

Done.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
FAQ