mirror of
https://github.com/curl/curl.git
synced 2026-07-23 17:27:22 +03:00
Call setlocale() for libtest tests to test the effects of locale-induced
libc changes on libcurl.
This commit is contained in:
parent
14a6788535
commit
6bb9ef8de4
1 changed files with 14 additions and 0 deletions
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h> /* for setlocale() */
|
||||
#endif
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
# define MEMDEBUG_NODEFINES
|
||||
# include "memdebug.h"
|
||||
|
|
@ -60,6 +64,16 @@ int main(int argc, char **argv)
|
|||
curl_free(env);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Setup proper locale from environment. This is needed to enable locale-
|
||||
* specific behaviour by the C library in order to test for undesired side
|
||||
* effects that could cause in libcurl.
|
||||
*/
|
||||
#ifdef HAVE_SETLOCALE
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
||||
if(argc< 2 ) {
|
||||
fprintf(stderr, "Pass URL as argument please\n");
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue