Debian Codegraph @

share/libc/sys/utsname.h

raw
1 /**************************************************************************/
2 /* */
3 /* This file is part of Frama-C. */
4 /* */
5 /* Copyright (C) 2007-2022 */
6 /* CEA (Commissariat à l'énergie atomique et aux énergies */
7 /* alternatives) */
8 /* */
9 /* you can redistribute it and/or modify it under the terms of the GNU */
10 /* Lesser General Public License as published by the Free Software */
11 /* Foundation, version 2.1. */
12 /* */
13 /* It is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU Lesser General Public License for more details. */
17 /* */
18 /* See the GNU Lesser General Public License version 2.1 */
19 /* for more details (enclosed in the file licenses/LGPLv2.1). */
20 /* */
21 /**************************************************************************/
22
23 #ifndef __FC_SYS_UTSNAME_H__
24 #define __FC_SYS_UTSNAME_H__
25
26 #include "../features.h"
27 __PUSH_FC_STDLIB
28 __BEGIN_DECLS
29
30 // Arbitrary length, based on the one used in Linux
31 #define _FC_UTSNAME_LENGTH 65
32
33 struct utsname
34 {
35 char sysname[_FC_UTSNAME_LENGTH];
36 char nodename[_FC_UTSNAME_LENGTH];
37 char release[_FC_UTSNAME_LENGTH];
38 char version[_FC_UTSNAME_LENGTH];
39 char machine[_FC_UTSNAME_LENGTH];
40 };
41
42 /*@ // missing: assigns *name, \result \from "system information"
43 requires valid_name: \valid(name);
44 assigns *name, \result \from \nothing;
45 ensures result_ok_or_error: -1 <= \result;
46 ensures initialization:name:\initialized(name);
47 */
48 extern int uname (struct utsname *name);
49
50 __END_DECLS
51 __POP_FC_STDLIB
52 #endif