Get checkwps compiling again: Move the definitions of BOM and BOM_SIZE to misc.c (they are not used outside misc.c, so don't need to be in the .h), plus always include misc.h in misc.c (not needed to fix checkwps, but good practice), and add unistd.h when __PCTOOL_ is defined.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18358 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1f7b22bd37
commit
a3a5450399
2 changed files with 5 additions and 4 deletions
|
@ -21,11 +21,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include "config.h"
|
||||
#include "misc.h"
|
||||
#include "lcd.h"
|
||||
#include "file.h"
|
||||
#ifdef __PCTOOL__
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include "sprintf.h"
|
||||
#include "lang.h"
|
||||
|
@ -71,7 +73,6 @@
|
|||
#include "gui/gwps-common.h"
|
||||
#include "bookmark.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "playback.h"
|
||||
|
||||
#ifdef BOOTFILE
|
||||
|
@ -1183,6 +1184,9 @@ char *strip_extension(char* buffer, int buffer_size, const char *filename)
|
|||
* If the file is opened for writing and O_TRUNC is set, write a BOM to
|
||||
* the opened file and leave the file pointer set after the BOM.
|
||||
*/
|
||||
#define BOM "\xef\xbb\xbf"
|
||||
#define BOM_SIZE 3
|
||||
|
||||
int open_utf8(const char* pathname, int flags)
|
||||
{
|
||||
int fd;
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#define BOM "\xef\xbb\xbf"
|
||||
#define BOM_SIZE 3
|
||||
|
||||
/* Format a large-range value for output, using the appropriate unit so that
|
||||
* the displayed value is in the range 1 <= display < 1000 (1024 for "binary"
|
||||
* units) if possible, and 3 significant digits are shown. If a buffer is
|
||||
|
|
Loading…
Reference in a new issue