Procházet zdrojové kódy

sys: don’t use fopen on the PS3.

legacy
Sam Hocevar sam před 13 roky
rodič
revize
03d135f06d
1 změnil soubory, kde provedl 8 přidání a 4 odebrání
  1. +8
    -4
      src/sys/file.cpp

+ 8
- 4
src/sys/file.cpp Zobrazit soubor

@@ -23,7 +23,8 @@ class FileData


void Open(String const &file, FileAccess mode) void Open(String const &file, FileAccess mode)
{ {
#if HAVE_STDIO_H
#if __CELLOS_LV2__
#elif HAVE_STDIO_H
/* FIXME: no modes, no error checking, no nothing */ /* FIXME: no modes, no error checking, no nothing */
m_fd = fopen(file.C(), "r"); m_fd = fopen(file.C(), "r");
#endif #endif
@@ -32,7 +33,8 @@ class FileData
String ReadString() String ReadString()
{ {
String ret; String ret;
#if HAVE_STDIO_H
#if __CELLOS_LV2__
#elif HAVE_STDIO_H
while (!feof(m_fd)) while (!feof(m_fd))
{ {
char buf[BUFSIZ]; char buf[BUFSIZ];
@@ -50,12 +52,14 @@ class FileData


void Close() void Close()
{ {
#if HAVE_STDIO_H
#if __CELLOS_LV2__
#elif HAVE_STDIO_H
fclose(m_fd); fclose(m_fd);
#endif #endif
} }


#if HAVE_STDIO_H
#if __CELLOS_LV2__
#elif HAVE_STDIO_H
FILE *m_fd; FILE *m_fd;
#endif #endif
Atomic<int> m_refcount; Atomic<int> m_refcount;


Načítá se…
Zrušit
Uložit