patch problems w/nt install - Mailing list pgsql-admin

From LOYD NICOLE DANIELLE
Subject patch problems w/nt install
Date
Msg-id Pine.GSO.3.96.1000426141200.3901B-300000@rintintin.colorado.edu
Whole thread Raw
List pgsql-admin
I am attempting to install pgsql on an NT machine, per the
instructions at http://www.postgresql.org/docs/pgsql/doc/README.NT, and I
have run into a problem.  The instruction say to apply the patch found at
the end of the file to the cygipc sources.  However, the patch does not
fit the source code.  No one else appears to have had this problem.  Did I
do something wrong, or is there an updated patch I should be using?  The
patch rejects are attached in hopes that they will help.

Thanks very much.

Nicole



patching file `sem.c'

Hunk #1 succeeded at 58 with fuzz 2.

Hunk #2 succeeded at 92 with fuzz 1.

Hunk #3 succeeded at 203 with fuzz 2.

Hunk #4 FAILED at 373.

Hunk #5 FAILED at 390.

Hunk #6 FAILED at 452.

patch unexpectedly ends in middle of line

Hunk #7 FAILED at 584.

4 out of 7 hunks FAILED -- saving rejects to sem.c.rej

patch unexpectedly ends in middle of line

***************

*** 357,371 ****

  debug_printf("do_semop : return -EACCES\n");

                        CYGWIN32_IPCNT_RETURN (-EACCES) ;

                    }

!                   ReleaseSemaphore(LHandle, sop->sem_op, &LVal) ;

!                   shareadrsem->current_nb[id].current_nb[sop->sem_num] +=

!                                       sop->sem_op ;

                    sem_deconnect() ;

                } else {

                    if( sop->sem_flg == IPC_NOWAIT )

                    {

!                       LRet = WaitForSingleObject(LHandle, 0) ;

!                       if( LRet == WAIT_TIMEOUT )

                        {

  debug_printf("do_semop : return -EAGAIN\n");

                            CYGWIN32_IPCNT_RETURN (-EAGAIN) ;

--- 373,386 ----

  debug_printf("do_semop : return -EACCES\n");

                        CYGWIN32_IPCNT_RETURN (-EACCES) ;

                    }

!           shareadrsem->current_nb[id].current_nb[sop->sem_num] +=

!                               sop->sem_op ;

                    sem_deconnect() ;

+                   ReleaseSemaphore(LHandle, 1 , &LVal) ;

                } else {

                    if( sop->sem_flg == IPC_NOWAIT )

                    {

!                       if( sop->sem_op + shareadrsem->current_nb[id].current_nb[sop->sem_num] <0 )

                        {

  debug_printf("do_semop : return -EAGAIN\n");

                            CYGWIN32_IPCNT_RETURN (-EAGAIN) ;

***************

*** 375,390 ****

  debug_printf("do_semop : return -EACCES\n");

                            CYGWIN32_IPCNT_RETURN (-EACCES) ;

                        }

!                       shareadrsem->current_nb[id].current_nb[sop->sem_num] -= 1 ;

                        sem_deconnect() ;

                    } else {

!                       LRet = WaitForSingleObject(LHandle, INFINITE) ;

                        if (sem_connect() == 0)

                        {

  debug_printf("do_semop : return -EACCES\n");

                            CYGWIN32_IPCNT_RETURN (-EACCES) ;

                        }

!                           shareadrsem->current_nb[id].current_nb[sop->sem_num] -= 1 ;

                            sem_deconnect() ;

                    }

                }

--- 390,407 ----

  debug_printf("do_semop : return -EACCES\n");

                            CYGWIN32_IPCNT_RETURN (-EACCES) ;

                        }

!                       shareadrsem->current_nb[id].current_nb[sop->sem_num] += sop->sem_op;

                        sem_deconnect() ;

                    } else {

!                   while(sop->sem_op + shareadrsem->current_nb[id].current_nb[sop->sem_num] <0)

!                               LRet = WaitForSingleObject(LHandle, INFINITE) ;

!                   

                        if (sem_connect() == 0)

                        {

  debug_printf("do_semop : return -EACCES\n");

                            CYGWIN32_IPCNT_RETURN (-EACCES) ;

                        }

!                           shareadrsem->current_nb[id].current_nb[sop->sem_num] += sop->sem_op ;

                            sem_deconnect() ;

                    }

                }

***************

*** 435,441 ****

        char LBuff[100] ;

        HANDLE LHandle ;

        long LPrevious ;

-       int LIndex;

  

  debug_printf("semctl : semid=%X semnum=%X cmd=0x%02X arg=%p\n",semid,semnum,cmd,arg);

        if (semid < 0 || semnum < 0 || cmd < 0)

--- 452,457 ----

        char LBuff[100] ;

        HANDLE LHandle ;

        long LPrevious ;

  

  debug_printf("semctl : semid=%X semnum=%X cmd=0x%02X arg=%p\n",semid,semnum,cmd,arg);

        if (semid < 0 || semnum < 0 || cmd < 0)

***************

*** 568,589 ****

                if( LHandle != NULL )

                {

                    if( arg.val > shareadrsem->current_nb[id].current_nb[semnum] )

!                   {

!                       ReleaseSemaphore(LHandle,

!                       arg.val-shareadrsem->current_nb[id].current_nb[semnum],

!                       &LPrevious) ;

!                   }

!                   else if (arg.val <

!                            shareadrsem->current_nb[id].current_nb[semnum] )

!                   {

!                       for( LIndex = arg.val;

!                       LIndex < shareadrsem->current_nb[id].current_nb[semnum];

!                       LIndex++ )

!                       {

!                           WaitForSingleObject(LHandle, 0) ;

!                       }

!                   }

!                   shareadrsem->current_nb[id].current_nb[semnum] = arg.val ;

                }

  debug_printf("semctl : SETVAL : return 0\n");

                CYGWIN32_IPCNT_RETURN_DECONNECT (0);

--- 584,591 ----

                if( LHandle != NULL )

                {

                    if( arg.val > shareadrsem->current_nb[id].current_nb[semnum] )

!                               ReleaseSemaphore(LHandle,1,&LPrevious) ;

!             shareadrsem->current_nb[id].current_nb[semnum] = arg.val ;

                }

  debug_printf("semctl : SETVAL : return 0\n");

  


pgsql-admin by date:

Previous
From: jsahn@samsung.co.kr
Date:
Subject: [postgresql-7.0RC1] relocation error under solaris 2.6
Next
From: "Marco A. Bravo"
Date:
Subject: Backend closed the channel unexpectedly