Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > It is time for people to report their port testing.  Please test against
> > current CVS or beta5 and report your 'uname -a'.
> 
> This one is OK after the recent pthread.h patch:
> 
> NetBSD 1.6 (GENERIC) i386
> 
> However, the compile pointed out that in src/interfaces/libpq/fe-auth.c
> line 472, variable "cmsg" is unused; and indeed it seems to be right.
> Bruce, you worked most often on the peer authentication code, so maybe you
> can check that.

Not sure why those variable defines are there --- they aren't referenced
anywhere in that function when HAVE_STRUCT_SOCKCRED is also defined.  I
removed that code.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/libpq/hba.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/libpq/hba.c,v
retrieving revision 1.115
diff -c -c -r1.115 hba.c
*** src/backend/libpq/hba.c     25 Sep 2003 06:57:59 -0000      1.115
--- src/backend/libpq/hba.c     25 Oct 2003 03:38:59 -0000
***************
*** 1433,1447 ****
        struct msghdr msg;
  
  /* Credentials structure */
! #ifdef HAVE_STRUCT_CMSGCRED
        typedef struct cmsgcred Cred;
  
  #define cruid cmcred_uid
! #elif HAVE_STRUCT_FCRED
        typedef struct fcred Cred;
  
  #define cruid fc_uid
! #elif HAVE_STRUCT_SOCKCRED
        typedef struct sockcred Cred;
  
  #define cruid sc_uid
--- 1433,1447 ----
        struct msghdr msg;
  
  /* Credentials structure */
! #if defined(HAVE_STRUCT_CMSGCRED)
        typedef struct cmsgcred Cred;
  
  #define cruid cmcred_uid
! #elif defined(HAVE_STRUCT_FCRED)
        typedef struct fcred Cred;
  
  #define cruid fc_uid
! #elif defined(HAVE_STRUCT_SOCKCRED)
        typedef struct sockcred Cred;
  
  #define cruid sc_uid
Index: src/interfaces/libpq/fe-auth.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/libpq/fe-auth.c,v
retrieving revision 1.83
diff -c -c -r1.83 fe-auth.c
*** src/interfaces/libpq/fe-auth.c      4 Aug 2003 02:40:16 -0000       1.83
--- src/interfaces/libpq/fe-auth.c      25 Oct 2003 03:39:07 -0000
***************
*** 464,476 ****
        /* Point to start of first structure */
        struct cmsghdr *cmsg = (struct cmsghdr *) cmsgmem;
  #endif
- #ifdef HAVE_STRUCT_SOCKCRED
-       /* Prevent padding */
-       char            cmsgmem[sizeof(struct cmsghdr) + sizeof(struct sockcred)];
- 
-       /* Point to start of first structure */
-       struct cmsghdr *cmsg = (struct cmsghdr *) cmsgmem;
- #endif
  
        /*
         * The backend doesn't care what we send here, but it wants exactly
--- 464,469 ----
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to