summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/font.c6
-rw-r--r--firmware/include/inttypes.h5
-rw-r--r--firmware/include/time.h6
-rw-r--r--firmware/mp3data.c2
4 files changed, 16 insertions, 3 deletions
diff --git a/firmware/font.c b/firmware/font.c
index 03e18919da..465cec269a 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -522,9 +522,11 @@ void glyph_cache_save(void)
522{ 522{
523 523
524 if (fnt_file >= 0) { 524 if (fnt_file >= 0) {
525 525#ifdef WPSEDITOR
526 glyph_file = open(GLYPH_CACHE_FILE, O_WRONLY|O_CREAT|O_TRUNC);
527#else
526 glyph_file = creat(GLYPH_CACHE_FILE); 528 glyph_file = creat(GLYPH_CACHE_FILE);
527 529#endif
528 if (glyph_file < 0) return; 530 if (glyph_file < 0) return;
529 531
530 lru_traverse(&font_cache_ui._lru, glyph_file_write); 532 lru_traverse(&font_cache_ui._lru, glyph_file_write);
diff --git a/firmware/include/inttypes.h b/firmware/include/inttypes.h
index 1697f691d9..f7f5099bd7 100644
--- a/firmware/include/inttypes.h
+++ b/firmware/include/inttypes.h
@@ -22,6 +22,8 @@
22#ifndef __INTTYPES_H__ 22#ifndef __INTTYPES_H__
23#define __INTTYPES_H__ 23#define __INTTYPES_H__
24 24
25#ifndef WPSEDITOR
26
25#include <limits.h> 27#include <limits.h>
26 28
27/* 8 bit */ 29/* 8 bit */
@@ -103,5 +105,8 @@
103#define uint64_t unsigned long long 105#define uint64_t unsigned long long
104 106
105#endif 107#endif
108#else
109#include <stdint.h>
110#endif /* !WPSEDITOR*/
106 111
107#endif /* __INTTYPES_H__ */ 112#endif /* __INTTYPES_H__ */
diff --git a/firmware/include/time.h b/firmware/include/time.h
index 23f72fd93d..9200e82232 100644
--- a/firmware/include/time.h
+++ b/firmware/include/time.h
@@ -7,6 +7,11 @@
7#ifndef _TIME_H_ 7#ifndef _TIME_H_
8#define _TIME_H_ 8#define _TIME_H_
9 9
10#ifdef WPSEDITOR
11#include <sys/types.h>
12#include <time.h>
13#endif
14
10struct tm 15struct tm
11{ 16{
12 int tm_sec; 17 int tm_sec;
@@ -34,3 +39,4 @@ struct tm *localtime(const time_t *timep);
34 39
35#endif /* _TIME_H_ */ 40#endif /* _TIME_H_ */
36 41
42
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index 25e40f897a..80870cd8cd 100644
--- a/firmware/mp3data.c
+++ b/firmware/mp3data.c
@@ -550,6 +550,7 @@ int get_mp3file_info(int fd, struct mp3info *info)
550 return bytecount; 550 return bytecount;
551} 551}
552 552
553#ifndef __PCTOOL__
553static void long2bytes(unsigned char *buf, long val) 554static void long2bytes(unsigned char *buf, long val)
554{ 555{
555 buf[0] = (val >> 24) & 0xff; 556 buf[0] = (val >> 24) & 0xff;
@@ -558,7 +559,6 @@ static void long2bytes(unsigned char *buf, long val)
558 buf[3] = val & 0xff; 559 buf[3] = val & 0xff;
559} 560}
560 561
561#ifndef __PCTOOL__
562int count_mp3_frames(int fd, int startpos, int filesize, 562int count_mp3_frames(int fd, int startpos, int filesize,
563 void (*progressfunc)(int)) 563 void (*progressfunc)(int))
564{ 564{