No direnext?

Discussion in 'Wii - Emulation and Homebrew' started by cwstjdenobs, Jul 13, 2011.

  1. cwstjdenobs
    OP

    cwstjdenobs Sodomy non sapiens

    Member
    1,757
    1
    Mar 10, 2009
    Ankh-Morpork
    Ok, so I'm trying to compile some stuff I know used to work, but I don't seem to have dirnext, diropen, et al.

    Now have I forgot to install something, or do I just have to stop being lazy and fix my code?
     
  2. jskyboo

    jskyboo GBAtemp Regular

    Member
    288
    24
    Sep 12, 2009
    United States
    After switching to the new devkitPPC 23 and libogc 1.8.7 I got the same errors. I believe we include for those functions. Im not sure why they no longer can be found but as I need them for now Im staying on the previous devkitPPC.
     
  3. cwstjdenobs
    OP

    cwstjdenobs Sodomy non sapiens

    Member
    1,757
    1
    Mar 10, 2009
    Ankh-Morpork
    Thanks. I've rolled stuff back and got it working now. Will defo have to fix it for newer devkitPPC/libogc versions though.
     
  4. Jacobeian

    Jacobeian GBAtemp Advanced Maniac

    Member
    1,882
    122
    May 15, 2008
    Cuba
    You need to replace diropen by "opendir", dirclose by "closedir" and dirnext with "readdir".

    The new open/close functions use "DIR" structure, not "DIR_ITER", and readdir usage is substantially different from dirnext so you want to learn how to use it first.
     
  5. cwstjdenobs
    OP

    cwstjdenobs Sodomy non sapiens

    Member
    1,757
    1
    Mar 10, 2009
    Ankh-Morpork
    ^^ Thanks again. Lol, I know how to use all that, and really get the motivation for going with it. Just going to be a bit of an arse.
     
  6. jskyboo

    jskyboo GBAtemp Regular

    Member
    288
    24
    Sep 12, 2009
    United States
     
  7. tueidj

    tueidj I R Expert

    Member
    2,569
    820
    Jan 8, 2009
    opendir/readdir/closedir are standard(-ish) C functions, while diropen/dirnext/dirclose are internal functions specific to devkitpro. Someone decided it was time everyone started using the "regular" functions so the other ones aren't exposed for outside use anymore.
     
  8. Wiimm

    Wiimm Developer

    Member
    2,159
    368
    Aug 11, 2009
    Gambia, The
    Germany
    Sorry for late reply, but I saw this a few minutes ago:
    These functions are *not* standard C, C doesn't know how anything about directories. They follow the POSIX standard.