There is not enough information in the C header file to write the bindings for another language. In very simple cases (for example, all functions accept only arguments with integers or floating point), this is possible, but as soon as the pointers are involved, you need to provide additional information: whether the function will be read from the specified value, write to it or to one and the other? Should the interface allow null pointer? This is actually an array pointer, but where is the size? Is this a char* pointer to a null-terminated string?
IDL extends C function declarations with additional annotations to cover all of these points. This is why camlidl runs on IDL and not directly on C. headers. You won't find anything significantly less painful.
There is another approach, which is to freely annotate your C headers with macros that have an empty extension but provide additional type information, for example.
int memmove(void ANN_OUT ANN_SIZE(n) ANN_NOT_NULL *dest, const void ANN_IN ANN_SIZE(n) ANN_NOT_NULL *src, size_t n);
Such annotations are not standardized, so if you go along this route, you will have to write your own tools. (See Cil if you want to parse C.) I recommend instead treating IDL declarations as primary and generating header C files from them.
source share