Skip to content

C library: add __time64 #8268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/ansi-c/library/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,23 @@
#undef time

time_t __VERIFIER_nondet_time_t(void);
time_t __time64(time_t *);

time_t time(time_t *tloc)
{
return __time64(tloc);
}

/* FUNCTION: __time64 */

#ifndef __CPROVER_TIME_H_INCLUDED
# include <time.h>
# define __CPROVER_TIME_H_INCLUDED
#endif

time_t __VERIFIER_nondet_time_t(void);

time_t __time64(time_t *tloc)
{
time_t res=__VERIFIER_nondet_time_t();
if(tloc)
Expand Down
1 change: 1 addition & 0 deletions src/ansi-c/library_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ perl -p -i -e 's/^__fprintf_chk\n//' __functions # fprintf-01/__fprintf_chk.desc
perl -p -i -e 's/^__fread_chk\n//' __functions # fread-01/__fread_chk.desc
perl -p -i -e 's/^__printf_chk\n//' __functions # printf-01/__printf_chk.desc
perl -p -i -e 's/^__syslog_chk\n//' __functions # syslog-01/__syslog_chk.desc
perl -p -i -e 's/^__time64\n//' __functions # time
perl -p -i -e 's/^__vfprintf_chk\n//' __functions # vfprintf-01/__vfprintf_chk.desc

# Some functions are covered by tests in other folders:
Expand Down