Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
427ca8a0
Commit
427ca8a0
authored
6 months ago
by
Basile Desloges
Committed by
Andre Maroneze
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[libc] Add mkostemp and mkostemps
parent
00a5b4c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/libc/stdlib.h
+27
-0
27 additions, 0 deletions
share/libc/stdlib.h
with
27 additions
and
0 deletions
share/libc/stdlib.h
+
27
−
0
View file @
427ca8a0
...
@@ -823,6 +823,19 @@ extern int posix_memalign(void **memptr, size_t alignment, size_t size);
...
@@ -823,6 +823,19 @@ extern int posix_memalign(void **memptr, size_t alignment, size_t size);
*/
*/
extern
int
mkstemp
(
char
*
templat
);
extern
int
mkstemp
(
char
*
templat
);
/*@
// missing: requires 'last 6 characters of template must be XXXXXX'
// missing: assigns \result, templat[0..] \from 'filesystem', 'RNG';
// missing: flags == O_APPEND || O_CLOEXEC || O_SYNC
requires valid_template: valid_string(templat);
requires template_len: strlen(templat) >= 6;
assigns templat[0..] \from \nothing;
assigns \result \from \nothing;
ensures result_error_or_valid_fd: \result == -1 ||
0 <= \result < __FC_FOPEN_MAX;
*/
extern
int
mkostemp
(
char
*
templat
,
int
flags
);
/*@
/*@
// missing: requires 'last (6+suffixlen) characters of template must be X's'
// missing: requires 'last (6+suffixlen) characters of template must be X's'
// missing: assigns \result, templat[0..] \from 'filesystem', 'RNG';
// missing: assigns \result, templat[0..] \from 'filesystem', 'RNG';
...
@@ -836,6 +849,20 @@ extern int mkstemp(char *templat);
...
@@ -836,6 +849,20 @@ extern int mkstemp(char *templat);
*/
*/
extern
int
mkstemps
(
char
*
templat
,
int
suffixlen
);
extern
int
mkstemps
(
char
*
templat
,
int
suffixlen
);
/*@
// missing: requires 'last (6+suffixlen) characters of template must be X's'
// missing: assigns \result, templat[0..] \from 'filesystem', 'RNG';
// missing: flags == O_APPEND || O_CLOEXEC || O_SYNC
requires valid_template: valid_string(templat);
requires template_len: strlen(templat) >= 6 + suffixlen;
requires non_negative_suffixlen: suffixlen >= 0;
assigns templat[0..] \from \nothing;
assigns \result \from \nothing;
ensures result_error_or_valid_fd: \result == -1 ||
0 <= \result < __FC_FOPEN_MAX;
*/
extern
int
mkostemps
(
char
*
templat
,
int
suffixlen
,
int
flags
);
// 'realpath' may allocate memory for the result, which is not supported by
// 'realpath' may allocate memory for the result, which is not supported by
// some plugins such as Eva. In such cases, it is preferable to use the stub
// some plugins such as Eva. In such cases, it is preferable to use the stub
// provided in stdlib.c.
// provided in stdlib.c.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment