This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygipc should not include cygipc in sem.h


David,
   Thanks for the heads up.  Note that "Sun doesn't do it that way" 
isn't a very persuasive argument; "Linux doesn't..." or "SUSv2 says 
that..." is more persuasive.  Fortunately, you got me curious, and 
indeed, SUSv2 agrees with Sun on this issue.

http://www.opengroup.org/onlinepubs/007908799/xsh/semctl.html

Unfortunately, I don't have time to track this down and fix it myself 
right now.  However, I'd be happy to accept a patch...as long as the 
bundled apps were all modified to define semun.  This includes 
ipc-daemon, as well as semtool, shmtool, and msgtool.  And the patch was 
verified to work properly...

--Chuck

David wrote:

> Hello,
> 
> I couldn't find a separate list for cygutils on
> 
> 	http://www.neuro.gatech.edu/users/cwilson/cygutils/index.html
> 
> and I want to point out that including the semum union in sem.h
> makes the package incompatable with sun unix which expects the
> union to be declared in the application program. See below.
> 
> I get compiler errors if I include sem.h in a program which 
> defines the semun union, and I get compilier prototype errors
> if I try to hand semctl anything other than a union with the
> name semun. 
> 
> David
> 
> 
> 
> semctl(2)                 System Calls                  semctl(2)
> 
> NAME
>      semctl - semaphore control operations
> 
> SYNOPSIS
>      #include <sys/types.h>
>      #include <sys/ipc.h>
>      #include <sys/sem.h>
> 
>      int semctl(int semid, int semnum, int cmd, ...);
> 
> DESCRIPTION
>      semctl() provides a variety of semaphore control  operations
>      as  specified  by  cmd.   The  fourth  argument is optional,
>      depending upon the operation requested.  If required  it  is
>      of  type  union  semun, which must be explicitly declared by
>      the application program.
>           union semun {
>                int val;
>                struct semid_ds *buf;
>                ushort *array
>           } _a_r_g;
> 
> SunOS 5.5.1         Last change: 24 Mar 1994                    3
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]