Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
6fc29808
Commit
6fc29808
authored
12 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Task #3696: Added HAVE_STRNLEN, because strnlen() is GNU only
parent
03fb289d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMake/LofarGeneral.cmake
+12
-0
12 additions, 0 deletions
CMake/LofarGeneral.cmake
lofar_config.h.cmake
+3
-0
3 additions, 0 deletions
lofar_config.h.cmake
with
15 additions
and
0 deletions
CMake/LofarGeneral.cmake
+
12
−
0
View file @
6fc29808
...
...
@@ -126,6 +126,18 @@ if(NOT DEFINED LOFAR_GENERAL_INCLUDED)
}"
HAVE_GETPROTOBYNAME_R
)
endif
(
HAVE_NETDB_H
)
## --------------------------------------------------------------------------
## Define `STRNLEN', if the strnlen() function exists.
## --------------------------------------------------------------------------
check_c_source_compiles
(
"
#include <string.h>
#include <stdio.h>
int main() {
char *s =
\"
test
\"
;
int i = 3;
unsigned l = strnlen(s,i);
}"
HAVE_STRNLEN
)
## --------------------------------------------------------------------------
## Define custom target 'check', so that we can do 'make check', like we did
## with the GNU Autotools. Tests should be added with lofar_add_test().
...
...
This diff is collapsed.
Click to expand it.
lofar_config.h.cmake
+
3
−
0
View file @
6fc29808
...
...
@@ -172,3 +172,6 @@
/* Define to 1 if you have a declaration for the `getprotobyname_r' function. */
#cmakedefine HAVE_GETPROTOBYNAME_R 1
/* Define to 1 if you have a declaration for the `strnlen' function. */
#cmakedefine HAVE_STRNLEN 1
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