On Tue, Dec 17, 2013 at 02:02:16AM +0000, Alin Serdean wrote:
> I added also syslog.h as you suggested(this will help us in the future 
> patches).
> 
> Regarding the warnings I will send a detailed list iwth their corespondence 
> in another mail and we can discuss further if we want to add them or not.
> 
> I hope everything is in order now :).
> 
> Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions>

One function that stuck out as odd was ffs(), which shouldn't be
needed.  Looking at the tree, we still had one user, so I sent out a
patch to fix that.

Please move these definitions into lib/string.h.in:
> +#define strtok_r strtok_s
> +#define strcasecmp _stricmp
> +#define strncasecmp _strnicmp

Why are these necessary?  We have existing definitions that work fine on
BSD, why is Windows different?
> +typedef unsigned char __u8;
> +typedef unsigned short __u16;
> +typedef unsigned int  __u32;
> +typedef unsigned long long __u64;
> +typedef unsigned short __le16;
> +typedef unsigned short __be16;
> +typedef unsigned int __le32;
> +typedef unsigned int __be32;
> +typedef unsigned long long __le64;
> +typedef unsigned long long __be64;

The #undefs below are puzzling.  Does Windows have these macros or not?
(Also you defined WCOREDUMP twice.)
> +#undef WCOREDUMP
> +#define WCOREDUMP(status) ((status) & 0x80)
> +#undef WEXITSTATUS
> +#define WEXITSTATUS(status) (((status)  & 0xff00) >> 8)
> +#undef WIFEXITED
> +#define WIFEXITED(status) (WTERMSIG(status) == 0)
> +#undef WIFSTOPPED
> +#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
> +#undef WIFSIGNALED
> +#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status))
> +#undef WSTOPSIG
> +#define WSTOPSIG(status) WEXITSTATUS(status)
> +#undef WTERMSIG
> +#define WTERMSIG(status) ((status) & 0x7f)
> +#undef WCOREDUMP
> +#define WCOREDUMP(status) ((status) & 0x80)

I think I'm OK with the rest.  Some of them could be moved into
individual header files but none seems like a big deal to me.

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to