Skip to content

Commit

Permalink
configure: Silence check for broken strtok_r().
Browse files Browse the repository at this point in the history
The check for strtok_r() prints a line of text on stdout as part of its
run.  This is noticeable when running "configure", especially with -q.
This commit fixes it.

(The apparent alternative of not printing anything at all seems like a bad
idea because this might encourage the compiler to completely optimize
everything out of main().)
  • Loading branch information
blp committed Jan 26, 2010
1 parent 1fa5a10 commit 5819a7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acinclude.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- autoconf -*-

# Copyright (c) 2008, 2009 Nicira Networks.
# Copyright (c) 2008, 2009, 2010 Nicira Networks.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -191,6 +191,7 @@ AC_DEFUN([OVS_CHECK_STRTOK_R],
char *token1, *token2;
token1 = strtok_r(string, ":", &save_ptr);
token2 = strtok_r(NULL, ":", &save_ptr);
freopen ("/dev/null", "w", stdout);
printf ("%s %s\n", token1, token2);
return 0;
]])],
Expand Down

0 comments on commit 5819a7c

Please sign in to comment.