Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


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

[Frama-c-discuss] Does it contain errors in file fcntl.h?


  • Subject: [Frama-c-discuss] Does it contain errors in file fcntl.h?
  • From: pascal.cuoq at gmail.com (Pascal Cuoq)
  • Date: Wed, 21 Mar 2012 10:17:41 +0100
  • In-reply-to: <CALiiei40FJECQ7Lj0_U8vW1JoM2NebhdKG=QNs-VhLEgqYdzdA@mail.gmail.com>
  • References: <CALiiei40FJECQ7Lj0_U8vW1JoM2NebhdKG=QNs-VhLEgqYdzdA@mail.gmail.com>

You are right. As I warned previously on this list, the standard headers should be considered untested work-in-progress. The file has been fixed.

Pascal

On 21 mars 2012, at 06:29, Henry <njucslzh0714 at gmail.com> wrote:

> Hi, I found that the file share/libc/fcntl.h in frama-c-Nitrogen may be wrong, because there is no "if" to match the last "endif". 
> 
> /* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
> #define F_RDLCK		0	/* Read lock.  */
> #define F_WRLCK		1	/* Write lock.	*/
> #define F_UNLCK		2	/* Remove lock.	 */
> 
> /* For old implementation of bsd flock().  */
> #define F_EXLCK		4	/* or 3 */
> #define F_SHLCK		8	/* or 4 */
> struct flock
>   {
>     short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
>     short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
>     off_t l_start;	/* Offset where the lock begins.  */
>     off_t l_len;	/* Size of the locked area; zero means until EOF.  */
>     pid_t l_pid;	/* Process holding the lock.  */
>  };
> 
> int  creat(const char *, mode_t);
> int  fcntl(int, int, ...);
> int  open(const char *, int, ...);
> 
> #endif
> 
> 
> Best wishes.
> --
> Henry
> _______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss