Sorry folks, looks like it's not a CodeBlocks issue after all.
Just tried and experiment. Turns out this:
struct sockaddr_in
{
sa_family_t sin_family; /* Address family */
in_port_t sin_port; /* Port number */
struct in_addr sin_addr; /* Internet address */
/* Pad to size of `struct sockaddr'. */
unsigned char __pad[__SOCK_SIZE__ - sizeof(short int)
- sizeof(unsigned short int) - sizeof(struct in_addr)];
};
sockaddr_in *addr = NULL;
gives you this:
C:/cygwin/home/eb/rap00/main.c:60: error: `sockaddr_in' undeclared (first use in this function)
PLUS other 'struct' declarations in this file work fine, that is they appear in the CodeBlocks Symbols list.
So there must be a problem with the way the struct is being called out.
Good ol' Cygwin...
Hold on...
Consider the code:
struct group_filter
{
uint32_t gf_interface;
struct sockaddr_storage gf_group;
uint32_t gf_fmode;
uint32_t gf_numsrc;
struct sockaddr_storage gf_slist[1];
};
#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
- sizeof (struct sockaddr_storage) \
+ (numsrc) * sizeof (struct sockaddr_storage))
/* Structure describing an Internet (IP) socket address. */
#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
struct sockaddr_in
{
sa_family_t sin_family; /* Address family */
in_port_t sin_port; /* Port number */
struct in_addr sin_addr; /* Internet address */
/* Pad to size of `struct sockaddr'. */
unsigned char __pad[__SOCK_SIZE__ - sizeof(short int)
- sizeof(unsigned short int) - sizeof(struct in_addr)];
};
CodeBlocks sees group_filter as a symbol but not sockaddr_in. But if I insert a blank line above "struct sockaddr_in" CodeBlocks sees sockaddr_in and adds it to the 'All local symbols (workspace)' list.
I still get the compile error though. >:(
OH! And "Find declaration of:" finds it now.