Do not use std::cout for qurt's sake.

Using cout drags in std::localeconv which isn't defined
on QURT. While this file is also used for POSIX, it doesn't
seem to harm much to use printf there as well.
This commit is contained in:
Carlo Wood
2016-10-29 02:22:04 +02:00
committed by Lorenz Meier
parent 52b8e75aea
commit 0bff3593d3

View File

@@ -4,7 +4,7 @@
#include "apps.h" #include "apps.h"
#include <iostream> #include <cstdio>
#include <map> #include <map>
#include <string> #include <string>
@@ -44,7 +44,7 @@ void list_builtins(apps_map_type &apps)
int shutdown_main(int argc, char *argv[]) int shutdown_main(int argc, char *argv[])
{ {
std::cout << "Shutting down" << std::endl; printf("Shutting down\n");
exit(0); exit(0);
} }
@@ -80,7 +80,7 @@ int sleep_main(int argc, char *argv[])
} }
unsigned long usecs = 1000000UL * atol(argv[1]); unsigned long usecs = 1000000UL * atol(argv[1]);
std::cout << "Sleeping for " << argv[1] << " s; (" << usecs << " us)." << std::endl; printf("Sleeping for %s s; (%lu us).\n", argv[1], usecs);
usleep(usecs); usleep(usecs);
return 0; return 0;
} }