Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
94269a22
Commit
94269a22
authored
Oct 22, 2014
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Fallback for missing getline (used in the testsuite).
parent
8df19540
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
configure.ac
+2
-1
2 additions, 1 deletion
configure.ac
testsuite/ed25519-test.c
+38
-0
38 additions, 0 deletions
testsuite/ed25519-test.c
with
44 additions
and
1 deletion
ChangeLog
+
4
−
0
View file @
94269a22
2014-10-22 Niels Möller <nisse@lysator.liu.se>
2014-10-22 Niels Möller <nisse@lysator.liu.se>
* configure.ac: Check for getline function.
* testsuite/ed25519-test.c (getline) [!HAVE_GETLINE]: Fallback
definition.
* Makefile.in (clean-here): Unconditionally delete .so and .dll
* Makefile.in (clean-here): Unconditionally delete .so and .dll
files.
files.
(IMPLICIT_TARGETS): Deleted variable.
(IMPLICIT_TARGETS): Deleted variable.
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
2
−
1
View file @
94269a22
...
@@ -647,7 +647,8 @@ AC_CHECK_HEADERS([valgrind/memcheck.h])
...
@@ -647,7 +647,8 @@ AC_CHECK_HEADERS([valgrind/memcheck.h])
LSH_FUNC_ALLOCA
LSH_FUNC_ALLOCA
LSH_FUNC_STRERROR
LSH_FUNC_STRERROR
# Used in the testsuite
AC_CHECK_FUNCS(getline)
AC_C_BIGENDIAN
AC_C_BIGENDIAN
LSH_GCC_ATTRIBUTES
LSH_GCC_ATTRIBUTES
...
...
This diff is collapsed.
Click to expand it.
testsuite/ed25519-test.c
+
38
−
0
View file @
94269a22
...
@@ -117,6 +117,44 @@ test_one (const char *line)
...
@@ -117,6 +117,44 @@ test_one (const char *line)
free
(
msg
);
free
(
msg
);
}
}
#ifndef HAVE_GETLINE
static
ssize_t
getline
(
char
**
lineptr
,
size_t
*
n
,
FILE
*
f
)
{
size_t
i
;
int
c
;
if
(
!*
lineptr
)
{
*
n
=
500
;
*
lineptr
=
xalloc
(
*
n
);
}
i
=
0
;
do
{
c
=
getc
(
f
);
if
(
c
<
0
)
{
if
(
i
>
0
)
break
;
return
-
1
;
}
(
*
lineptr
)
[
i
++
]
=
c
;
if
(
i
==
*
n
)
{
*
n
*=
2
;
*
lineptr
=
realloc
(
*
lineptr
,
*
n
);
if
(
!*
lineptr
)
die
(
"Virtual memory exhausted.
\n
"
);
}
}
while
(
c
!=
'\n'
);
(
*
lineptr
)
[
i
]
=
0
;
return
i
;
}
#endif
void
void
test_main
(
void
)
test_main
(
void
)
{
{
...
...
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