Path: utzoo!attcan!uunet!aplcen!haven!udel!mmdf From: andrew@eleceng.bradford.ac.uk (Andrew G. Minter) Newsgroups: comp.os.minix Subject: Re: stdio.h : NULL Message-ID: <32115@nigel.ee.udel.edu> Date: 2 Oct 90 13:19:14 GMT Sender: mmdf@ee.udel.edu Lines: 35 > #ifdef NULL > #undef NULL > #endif > ... > #define NULL 0 > This really is bad!! It took me more than 2 hours with mdb to find out why > the program crashed. Of course, my machine's pointer size is not > sizeof int. Doesn't #define NULL ((void *)0) do the job an any machine? > Or do I miss something? This one caught me to. NULL is defined as you suggest in a number of other file in /usr/include, but not in stdio.h! The very fact that it is defined in so many places can cause problems when using Bruce Evans' C compiler, which protests when NULL is redefined. There seem to be quite a few fixes to small problems of this ilk floating around the net. Is anyone planning to collect them and introduce an official (or even unofficial) 1.6? We may have to wait a long time before there is any sign of 2.0. How would AST feel about some kind of unofficial user group version of Minix? Cheers, Andrew -- ############################################################################## # Andrew G. Minter, # JANET: andrew@bradford # # Lecturer in Information Systems, # EARN/BITNET: andrew@bradford.ac.uk # # Dept. of Electrical Engineering, # # # University of Bradford, # Phone: +44.274.733466 ext 347 or 326 # # Bradford, West Yorkshire, BD7 1DP # Telex: 51309 UNIBFD G # # United Kingdom # Fax: +44.274.391521 <-- just changed # ############################################################################## # Soon moving to STC Technology Ltd, London Road, Harlow, Essex # ##############################################################################