Help me to understand strange 'typedef ... ' in some source...

Working on some source I've found some strange declaration in included header file.
I am looking for someone's help to understand me that syntax's, as it is fine (it is compiled without any complain,) but for me it seems out of any sense!
Acctually, it warning by CC compiler: " Warning: Implicit int is not supported in C++". That why I have checked that.

#ifdef WIN32 
typedef (_cdecl *COMPARE_ADDR)(void *,void*); 
#else 
extern "C" { 
typedef (*COMPARE_ADDR)(void *,void*); 
} 
#endif 

I see it is preprared for diffrerent OS - Windows or Unix, but neither one 'typedef ..' I could understand

The 'typedef' should have [original_type] that will be reffered by the [user_defined_type].
So, it should be
typedef <initial_type> <new_name_for_initial_type>;

But here it seems as a casting or some function referencing syntax...
I could not understand what that means!

Could anyone give me a hint what that could be?

Thanks!

That is a typedef of a function. In this case the need was for portability -windows compiler versus maybe a linux C compiler.
No dataype declaration for the function. So, by default, the function will compile probably with a warning as a function that returns an integer.

So you do not worry about the platform, you will notice void * arguments. This lets you call COMPARE_ADDR with any datatypes as long as those datatypes are by reference (address of the object). It does not have a datatype for the function return. This kind of function typedef is usually done for situations where you want to call something to get a standard result, but windows and linux (example platform) do not have the same name for the function, but it may return { <0, 0, >0} for less than, equal to, or greater than.

Pretend example

#ifdef WIN32 
   COMPARE_ADDR=isequal;
#else
   COMPARE_ADDR=addr_foo;
#endif
/* see if the memory location of two variables is the same */
if  ( ! COMPARE_ADDR( &variable3, &variable1) {  /* if equal barf */
    errno=EINVAL;  /* invalid value error code */
    perror("Cannot continue, variables are identical and must not be identical\n");
    exit(1);   /* end program here */
}