discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GNUMail error


From: Ludovic Marcotte
Subject: RE: GNUMail error
Date: Wed, 10 Jul 2002 16:13:17 -0400 (EDT)

Hi Kristine,

> ...
> It is the same ld error returned by GNUMail.

Looks like flock() isn't defined at all.

You could always try to define a flock() function based on lockf() that 
would look like this (for example, in Pantomime/Source/MimeUtility.m):

int flock (int fd, int operation) 
{ 
  int i;
  
  switch (operation)
    {
    case LOCK_SH:
    case LOCK_EX: 
      i = lockf(fd, F_LOCK, 0); 
      break;
      
    case LOCK_SH|LOCK_NB:
    case LOCK_EX|LOCK_NB: 
      i = lockf(fd, F_TLOCK, 0); 
      if (i == -1) 
        if ((errno == EAGAIN) || (errno == EACCES))
          errno = EWOULDBLOCK; 
      break;
      
    case LOCK_UN: 
      i = lockf(fd, F_ULOCK, 0); 
      break;
      
    default: 
      i = -1;
      errno = EINVAL;
      break; 
    } 
  
  return (i); 
} 

If it still doesn't work, let me know so I'll install everything on my 
Solaris box and fix those issues.

Ludo

-- 
Live as if you were to die tomorrow.
Learn as if you were to live forever.
 - Gandhi






reply via email to

[Prev in Thread] Current Thread [Next in Thread]