mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user