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]
Other format: [Raw text]

Re: shmget : Function not implemented


Hello Gerrit,

Now it woks fine (see below).

Thanks.

"Gerrit P. Haase" <gp@familiehaase.de> wrote in message 5810613871.20040104173921@familiehaase.de">news:5810613871.20040104173921@familiehaase.de...
> Hallo Alex,
>
>
> >> Guesses:
> >> 1. The ipc-daemon2 needs to run.
> > How can one know that?
>
> Since you used the cygipc library to link against, you should read the
> documents which are included in the cygipc package.
>
> >> 2. Wrong headers (cygipc-2.x not installed)?
>
> > $ cygcheck -c | grep ipc
> > // Nothing
>
> Should be:
> $ cygcheck -c | grep ipc
> cygipc                  2.02-1             OK
>
> > $ cygcheck -s | grep ipc
> >    28k 2003/08/11 C:\cygwin\bin\cygcygipc-2.dll
>
> $ cygcheck -s | grep ipc
>    22k 2003/10/17 H:\bin\cygcygipc-2.dll
>
> That is an older DLL.  Have you installed it without using setup.exe?
> Install the latest cygipc with setup.exe to be sure all is in place
> and read the docs in /usr/share/doc/Cygwin where is explained how to
> install it as a service or how to run it without installing it as
> service (Win98).  Start the service and compile again, then it should
> run as it does for me.
>
>
> >>
> >> $ ls -l  /usr/include/sys/shm.h
> >> -rwxrwxrwx    1 #gerrit  Benutzer     3330 Oct 17 07:25 /usr/include/sys/shm.h
> >>
>
> > $ ls -l  /usr/include/sys/shm.h
> > -rw-r--r--    1 Administ None         3330 Aug 11 04:54 /usr/include/sys/shm.h
>
> Old version, see above.
>
[snip]




====== C code : File foo.c : BEGIN ======
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/shm.h>

int main()
{
const int id = shmget(IPC_PRIVATE, 2*sizeof(int), 0660);

  if (id == -1)
  {
    printf ("ERROR : %d - %s\n", errno, strerror(errno));
  }
  else
  {
    printf ("OK\n");
  }

  return 0;
}


====== C code : File foo.c : END ========


====== Compilation & Run : BEGIN ======

$ cygcheck -c | grep ipc
cygipc               2.02-1         OK

$ cygcheck -s | grep ipc
   22k 2003/10/17 C:\cygwin\bin\cygcygipc-2.dll
cygipc               2.02-1

$ ls -l  /usr/include/sys/shm.h
-rw-r--r--    1 Administ None         3330 Oct 17 07:25 /usr/include/sys/shm.h

$ gcc foo.c -lcygipc

$ a
ERROR : 88 - Function not implemented


$ ipc-daemon2&
[1] 1728

$ a
OK

====== Compilation & Run : END ========


--
   Alex Vinokur
     mailto:alexvn@connect.to
     http://mathforum.org/library/view/10978.html






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]