No direnext?

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

Jul 13, 2011

No direnext? by cwstjdenobs at 1:19 PM (2,230 Views / 0 Likes) 7 replies

  1. cwstjdenobs
    OP

    Member cwstjdenobs Sodomy non sapiens

    Joined:
    Mar 10, 2009
    Messages:
    1,757
    Location:
    Ankh-Morpork
    Country:
    United Kingdom
    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

    Member jskyboo GBAtemp Regular

    Joined:
    Sep 12, 2009
    Messages:
    288
    Country:
    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

    Member cwstjdenobs Sodomy non sapiens

    Joined:
    Mar 10, 2009
    Messages:
    1,757
    Location:
    Ankh-Morpork
    Country:
    United Kingdom
    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

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    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

    Member cwstjdenobs Sodomy non sapiens

    Joined:
    Mar 10, 2009
    Messages:
    1,757
    Location:
    Ankh-Morpork
    Country:
    United Kingdom
    ^^ 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

    Member jskyboo GBAtemp Regular

    Joined:
    Sep 12, 2009
    Messages:
    288
    Country:
    United States
     
  7. tueidj

    Member tueidj I R Expert

    Joined:
    Jan 8, 2009
    Messages:
    2,569
    Country:
    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

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,051
    Location:
    Germany
    Country:
    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.
     

Share This Page