Skip to content
Snippets Groups Projects
Commit 4eeb5855 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Libc] fix some minor issues

parent 25efb227
No related branches found
No related tags found
No related merge requests found
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
/**************************************************************************/ /**************************************************************************/
// This file is not in the C standard; it exists for compatibility purposes // This file is not in the C standard; it exists for compatibility purposes
#include <stdlib.h> #include "stdlib.h"
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
/**************************************************************************/ /**************************************************************************/
// This file is not in the C standard; it exists for compatibility purposes // This file is not in the C standard; it exists for compatibility purposes
#include <string.h> #include "string.h"
...@@ -366,8 +366,8 @@ extern void pthread_testcancel(void); ...@@ -366,8 +366,8 @@ extern void pthread_testcancel(void);
// From POSIX: "Inclusion of the <pthread.h> header shall make symbols defined // From POSIX: "Inclusion of the <pthread.h> header shall make symbols defined
// in the headers <sched.h> and <time.h> visible." // in the headers <sched.h> and <time.h> visible."
#include <sched.h> // (sched.h has already been included)
#include <time.h> #include "time.h"
__POP_FC_STDLIB __POP_FC_STDLIB
#endif #endif
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "features.h" #include "features.h"
__PUSH_FC_STDLIB __PUSH_FC_STDLIB
#include "__fc_builtin.h"
#include "__fc_define_uid_and_gid.h" #include "__fc_define_uid_and_gid.h"
#include "__fc_string_axiomatic.h" #include "__fc_string_axiomatic.h"
...@@ -45,16 +46,12 @@ struct passwd { ...@@ -45,16 +46,12 @@ struct passwd {
extern char __fc_getpwuid_pw_name[64]; extern char __fc_getpwuid_pw_name[64];
extern char __fc_getpwuid_pw_passwd[64]; extern char __fc_getpwuid_pw_passwd[64];
extern uid_t __fc_getpwuid_pw_uid;
extern gid_t __fc_getpwuid_pw_gid;
extern char __fc_getpwuid_pw_dir[64]; extern char __fc_getpwuid_pw_dir[64];
extern char __fc_getpwuid_pw_shell[64]; extern char __fc_getpwuid_pw_shell[64];
struct passwd __fc_pwd = struct passwd __fc_pwd =
{.pw_name = __fc_getpwuid_pw_name, {.pw_name = __fc_getpwuid_pw_name,
.pw_passwd = __fc_getpwuid_pw_passwd, .pw_passwd = __fc_getpwuid_pw_passwd,
.pw_uid = __fc_getpwuid_pw_uid,
.pw_gid = __fc_getpwuid_pw_gid,
.pw_dir = __fc_getpwuid_pw_dir, .pw_dir = __fc_getpwuid_pw_dir,
.pw_shell = __fc_getpwuid_pw_shell}; .pw_shell = __fc_getpwuid_pw_shell};
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define __FC_SEMAPHORE #define __FC_SEMAPHORE
#include "features.h" #include "features.h"
__PUSH_FC_STDLIB __PUSH_FC_STDLIB
#include <time.h> #include "time.h"
__BEGIN_DECLS __BEGIN_DECLS
......
...@@ -31,7 +31,7 @@ __PUSH_FC_STDLIB ...@@ -31,7 +31,7 @@ __PUSH_FC_STDLIB
#include "__fc_string_axiomatic.h" #include "__fc_string_axiomatic.h"
#include "errno.h" #include "errno.h"
#include "signal.h"
/* /*
* Names of the interval timers, and structure * Names of the interval timers, and structure
* defining a timer setting: * defining a timer setting:
......
...@@ -36,8 +36,8 @@ __PUSH_FC_STDLIB ...@@ -36,8 +36,8 @@ __PUSH_FC_STDLIB
#include "__fc_define_intptr_t.h" #include "__fc_define_intptr_t.h"
#include "__fc_select.h" #include "__fc_select.h"
#include <getopt.h> #include "getopt.h"
#include <limits.h> #include "limits.h"
extern volatile int Frama_C_entropy_source; extern volatile int Frama_C_entropy_source;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
__PUSH_FC_STDLIB __PUSH_FC_STDLIB
#include "__fc_define_pid_t.h" #include "__fc_define_pid_t.h"
#include <sys/time.h> #include "sys/time.h"
__BEGIN_DECLS __BEGIN_DECLS
......
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
/* Generated by Frama-C */ /* Generated by Frama-C */
#include "errno.h" #include "errno.h"
#include "inttypes.h" #include "inttypes.h"
#include "signal.h"
#include "stdarg.h" #include "stdarg.h"
#include "stddef.h" #include "stddef.h"
#include "stdint.h" #include "stdint.h"
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
__retres ∈ {0} __retres ∈ {0}
/* Generated by Frama-C */ /* Generated by Frama-C */
#include "errno.h" #include "errno.h"
#include "signal.h"
#include "stdarg.h" #include "stdarg.h"
#include "stdio.h" #include "stdio.h"
#include "time.h" #include "time.h"
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
S___fc_stdout[0..1] ∈ [--..--] S___fc_stdout[0..1] ∈ [--..--]
/* Generated by Frama-C */ /* Generated by Frama-C */
#include "errno.h" #include "errno.h"
#include "signal.h"
#include "stdarg.h" #include "stdarg.h"
#include "stdio.h" #include "stdio.h"
#include "time.h" #include "time.h"
......
...@@ -156,12 +156,12 @@ ...@@ -156,12 +156,12 @@
wcstombs (0 call); wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); wcstombs (0 call); wctomb (0 call); wmemchr (0 call); wmemcmp (0 call);
wmemmove (0 call); write (0 call); wmemmove (0 call); write (0 call);
'Extern' global variables (17) 'Extern' global variables (15)
============================== ==============================
__fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_gid; __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_name;
__fc_getpwuid_pw_name; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_hostname;
__fc_getpwuid_pw_uid; __fc_hostname; __fc_mblen_state; __fc_mbtowc_state; __fc_mblen_state; __fc_mbtowc_state; __fc_ttyname; __fc_wctomb_state;
__fc_ttyname; __fc_wctomb_state; optarg; opterr; optopt; tzname optarg; opterr; optopt; tzname
Potential entry points (1) Potential entry points (1)
========================== ==========================
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
============== ==============
Sloc = 1083 Sloc = 1083
Decision point = 204 Decision point = 204
Global variables = 68 Global variables = 66
If = 195 If = 195
Loop = 43 Loop = 43
Goto = 89 Goto = 89
......
...@@ -7050,10 +7050,6 @@ extern char __fc_getpwuid_pw_name[64]; ...@@ -7050,10 +7050,6 @@ extern char __fc_getpwuid_pw_name[64];
extern char __fc_getpwuid_pw_passwd[64]; extern char __fc_getpwuid_pw_passwd[64];
extern uid_t __fc_getpwuid_pw_uid;
extern gid_t __fc_getpwuid_pw_gid;
extern char __fc_getpwuid_pw_dir[64]; extern char __fc_getpwuid_pw_dir[64];
extern char __fc_getpwuid_pw_shell[64]; extern char __fc_getpwuid_pw_shell[64];
...@@ -7061,8 +7057,8 @@ extern char __fc_getpwuid_pw_shell[64]; ...@@ -7061,8 +7057,8 @@ extern char __fc_getpwuid_pw_shell[64];
struct passwd __fc_pwd = struct passwd __fc_pwd =
{.pw_name = __fc_getpwuid_pw_name, {.pw_name = __fc_getpwuid_pw_name,
.pw_passwd = __fc_getpwuid_pw_passwd, .pw_passwd = __fc_getpwuid_pw_passwd,
.pw_uid = __fc_getpwuid_pw_uid, .pw_uid = 0U,
.pw_gid = __fc_getpwuid_pw_gid, .pw_gid = 0U,
.pw_gecos = (char *)0, .pw_gecos = (char *)0,
.pw_dir = __fc_getpwuid_pw_dir, .pw_dir = __fc_getpwuid_pw_dir,
.pw_shell = __fc_getpwuid_pw_shell}; .pw_shell = __fc_getpwuid_pw_shell};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment