Commit eca7b9d1 authored by David Bühler's avatar David Bühler

Merge branch 'fix/andre/libc-bts-2489' into 'master'

[Libc] fix issue with undefined extern; restore GCC test with linking

See merge request frama-c/frama-c!2501
parents 53c35ea8 5647b9dd
...@@ -296,6 +296,7 @@ share/libc/termios.h: CEA_LGPL ...@@ -296,6 +296,7 @@ share/libc/termios.h: CEA_LGPL
share/libc/tgmath.h: CEA_LGPL share/libc/tgmath.h: CEA_LGPL
share/libc/time.c: CEA_LGPL share/libc/time.c: CEA_LGPL
share/libc/time.h: CEA_LGPL share/libc/time.h: CEA_LGPL
share/libc/unistd.c: CEA_LGPL
share/libc/unistd.h: CEA_LGPL share/libc/unistd.h: CEA_LGPL
share/libc/utime.h: CEA_LGPL share/libc/utime.h: CEA_LGPL
share/libc/utmpx.h: CEA_LGPL share/libc/utmpx.h: CEA_LGPL
......
...@@ -35,4 +35,5 @@ ...@@ -35,4 +35,5 @@
#include "stdio.c" #include "stdio.c"
#include "stdlib.c" #include "stdlib.c"
#include "string.c" #include "string.c"
#include "unistd.c"
#include "wchar.c" #include "wchar.c"
/**************************************************************************/
/* */
/* This file is part of Frama-C. */
/* */
/* Copyright (C) 2007-2019 */
/* CEA (Commissariat à l'énergie atomique et aux énergies */
/* alternatives) */
/* */
/* you can redistribute it and/or modify it under the terms of the GNU */
/* Lesser General Public License as published by the Free Software */
/* Foundation, version 2.1. */
/* */
/* It is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* See the GNU Lesser General Public License version 2.1 */
/* for more details (enclosed in the file licenses/LGPLv2.1). */
/* */
/**************************************************************************/
#include "unistd.h"
#include "__fc_builtin.h"
__PUSH_FC_STDLIB
volatile char __fc_ttyname[TTY_NAME_MAX];
__POP_FC_STDLIB
...@@ -157,12 +157,12 @@ ...@@ -157,12 +157,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 (16)
============================== ==============================
__fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_name; __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_name;
__fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_hostname; __fc_locale; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_hostname; __fc_locale;
__fc_locale_names; __fc_mblen_state; __fc_mbtowc_state; __fc_ttyname; __fc_locale_names; __fc_mblen_state; __fc_mbtowc_state; __fc_wctomb_state;
__fc_wctomb_state; optarg; opterr; optopt; tzname optarg; opterr; optopt; tzname
Potential entry points (1) Potential entry points (1)
========================== ==========================
...@@ -242,6 +242,7 @@ ...@@ -242,6 +242,7 @@
#include "syslog.h" #include "syslog.h"
#include "termios.h" #include "termios.h"
#include "time.h" #include "time.h"
#include "unistd.c"
#include "unistd.h" #include "unistd.h"
#include "wchar.c" #include "wchar.c"
#include "wchar.h" #include "wchar.h"
......
...@@ -1742,8 +1742,7 @@ extern void sync(void); ...@@ -1742,8 +1742,7 @@ extern void sync(void);
assigns \result \from (indirect: name); */ assigns \result \from (indirect: name); */
extern long sysconf(int name); extern long sysconf(int name);
extern char volatile __fc_ttyname[32]; char volatile __fc_ttyname[32];
char volatile *__fc_p_ttyname = __fc_ttyname; char volatile *__fc_p_ttyname = __fc_ttyname;
/*@ requires valid_fildes: 0 ≤ fildes < 1024; /*@ requires valid_fildes: 0 ≤ fildes < 1024;
ensures ensures
......
/* run.config* /* run.config*
COMMENT: tests that the runtime can compile without errors (for PathCrawler, E-ACSL, ...) COMMENT: tests that the runtime can compile without errors (for PathCrawler, E-ACSL, ...)
CMD: gcc -fsyntax-only -D__FC_MACHDEP_X86_64 share/libc/__fc_runtime.c -Wno-attributes -std=c99 CMD: gcc -D__FC_MACHDEP_X86_64 share/libc/__fc_runtime.c -Wno-attributes -std=c99 -o /dev/null
OPT: OPT:
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment