Path: utzoo!mnetor!motto!dave From: dave@motto.UUCP (dave brown) Newsgroups: comp.lang.c Subject: Including Message-ID: <71@motto.UUCP> Date: 12 Sep 89 14:09:33 GMT Lines: 33 I am writing a header file to be used by other programmers. Within this file, one of the structures needs the type size_t. This means that in order to compile properly, , which defines size_t, must be included as well. Since my header file will be used in programs I didn't write, I need to figure out how to make sure is included at the same time. Here are the ideas I have considered: 1. Document the requirement The documentation that tells the programmers to use would also tell them it requires . I would rather make things automatic, since if they neglect to include , the result will be a compile error inside my file, which is a rather messy way of telling them they left something out. 2. Include at the top of my header What if they have already included it? Is it guaranteed that it can be included more than once without causing errors? Are there any other ideas? What should I do? Thanks for your help, Dave ----------------------------------------------------------------------------- | David C. Brown | uunet!mnetor!motto!dave | | Motorola Canada, Ltd. | 416-499-1441 ext 3708 | | Communications Division | Disclaimer: Motorola is a very big company | -----------------------------------------------------------------------------