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
eba2aaa5
Commit
eba2aaa5
authored
3 years ago
by
Andre Maroneze
Committed by
Allan Blanchard
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[libc] minor fixes and improvements
parent
5b1221f5
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
share/libc/netdb.h
+8
-0
8 additions, 0 deletions
share/libc/netdb.h
share/libc/unistd.h
+6
-1
6 additions, 1 deletion
share/libc/unistd.h
tests/libc/netdb_c.c
+0
-8
0 additions, 8 deletions
tests/libc/netdb_c.c
tests/libc/unistd_h.c
+3
-0
3 additions, 0 deletions
tests/libc/unistd_h.c
with
17 additions
and
9 deletions
share/libc/netdb.h
+
8
−
0
View file @
eba2aaa5
...
...
@@ -99,6 +99,14 @@ struct addrinfo
# define NI_DGRAM 16
/* Look up UDP service rather than TCP. */
# define NI_NUMERICSCOPE 32
// Non-POSIX
#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
# define NI_MAXSERV 32
#endif
# define EAI_BADFLAGS -1
/* Invalid value for `ai_flags' field. */
# define EAI_NONAME -2
/* NAME or SERVICE is unknown. */
# define EAI_AGAIN -3
/* Temporary failure in name resolution. */
...
...
This diff is collapsed.
Click to expand it.
share/libc/unistd.h
+
6
−
1
View file @
eba2aaa5
...
...
@@ -1079,7 +1079,12 @@ extern pid_t setsid(void);
*/
extern
int
setuid
(
uid_t
uid
);
extern
unsigned
int
sleep
(
unsigned
int
);
/*@
assigns \result \from seconds;
ensures unslept: 0 <= \result <= seconds;
*/
extern
unsigned
int
sleep
(
unsigned
int
seconds
);
extern
void
swab
(
const
void
*
,
void
*
,
ssize_t
);
extern
int
symlink
(
const
char
*
,
const
char
*
);
...
...
This diff is collapsed.
Click to expand it.
tests/libc/netdb_c.c
+
0
−
8
View file @
eba2aaa5
...
...
@@ -12,14 +12,6 @@
#define BUF_SIZE 500
// Non-POSIX
#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
# define NI_MAXSERV 32
#endif
int
main
()
{
struct
addrinfo
hints
;
struct
addrinfo
*
result
,
*
rp
;
...
...
This diff is collapsed.
Click to expand it.
tests/libc/unistd_h.c
+
3
−
0
View file @
eba2aaa5
...
...
@@ -104,5 +104,8 @@ int main() {
r
=
pipe
(
pipefd
);
//@ check ok: r == 0 || r == -1;
int
unslept
=
sleep
(
42
);
//@ assert 0 <= unslept <= 42;
return
0
;
}
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