In kernel/proto.h, MINIX 3 defines two forward declarations struct proc
and struct timer
. However much of the type information within the parameters is missing. Examples such as clock_t
,U16_t
,tmr_func_t
, and message
are totally missing. There does not seem to be any #include
statements in the file either, so how is the compiler not complaining?
Asked
Active
Viewed 88 times
0

nanoman
- 341
- 4
- 11
-
It's probably not meant for direct inclusion. – Jul 21 '18 at 17:54
-
How come the forward declarations are in there? – nanoman Jul 21 '18 at 17:55
-
How should I know? Examine the rest of the source tree ;) – Jul 21 '18 at 17:56
2 Answers
1
Look in kernel/kernel.h, where it is clear that order of inclusion of some of the header files is important.
/* Important kernel header files. */
#include "config.h" /* configuration, MUST be first */
#include "const.h" /* constants, MUST be second */
#include "type.h" /* type definitions, MUST be third */
#include "proto.h" /* function prototypes */
#include "glo.h" /* global variables */
#include "ipc.h" /* IPC constants */
#include "debug.h" /* debugging, MUST be last kernel header */
Not every header file will include every other header file that it depends on. Learn to use your local search tools. Also, a google search for clock_t
would probably be instructive. Most of the others you mentioned, don't appear to be standard C library types.

jwdonahue
- 6,199
- 2
- 21
- 43
0
The header file is included with other header files that validate the missing types mentioned.

nanoman
- 341
- 4
- 11