>>866
元のヘッダをlegacy.hとして
$ cat legacy.h
#ifndef Legacy_H
#define Legacy_H
typedef struct {int i;} foo;
typedef struct {foo foo;} bar;
#endif
$ cat bar.h
#ifndef Bar_H
#define Bar_H
#ifdef __cplusplus
extern "C" {
struct bar;
struct foo;
#else
# include "legacy.h"
#endif
struct Bar {bar *bar_;};
struct Bar *init_bar (struct Bar *p);
int *access_foo_i (struct Bar *p);
#ifdef __cplusplus
}
#endif
#endif
(続く)