Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
53 user(s) are online (42 user(s) are browsing Forums)

Members: 0
Guests: 53

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: WookieChat 2.12 (27.01.10)

Subject: Re: WookieChat 2.12 (27.01.10)
by kas1e on 2017/1/6 19:37:49

@all
Is it safe to replace NEWLIST macro from SDK to NewList((struct List*)l) ? Why i ask, it because i do that change in wookiechat, as it use NEWLIST macro in few places, which give me:

error: request for member 'lh_Head' in something not a structure or union
error: request for member 'lh_Tail' in something not a structure or union
error: request for member 'lh_Tail' in something not a structure or union
error: request for member 'lh_TailPred' in something not a structure or union
error: request for member 'lh_Head' in something not a structure or union

For example that testcase just fail:

#include <proto/exec.h>
#include <exec/lists.h>

    
int main()
{
        
NEWLIST(NULL);
}


So i doing that:

#include <proto/exec.h>
#include <exec/lists.h>

#undef NEWLIST
#define NEWLIST(l) NewList((struct List*)l)

int main()
{
        
NEWLIST(NULL);
}


Is it ok ? I just not sure why it fail on os4 at all. I find it in the exec/lists.h , and that looks like this:

#define NEWLIST(x)                                       
  
do{                                                    
        (
x).lh_Head     = (struct Node *) &(x).lh_Tail;  
        (
x).lh_Tail     NULL;                          
        (
x).lh_TailPred = (struct Node *) &(x).lh_Head;  
    }while(
0)

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project