home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!gatech!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!pipex!bnr.co.uk!uknet!axion!nwinton
- From: nwinton@axion.bt.co.uk (Neil Winton)
- Newsgroups: comp.unix.aix
- Subject: malloc, AIX, Standards and Portability
- Keywords: malloc posix x/open standards ansi
- Message-ID: <C0qM70.10p@axion.bt.co.uk>
- Date: 12 Jan 93 10:52:11 GMT
- Sender: news@axion.bt.co.uk
- Organization: BT Laboratories
- Lines: 41
-
- Let's get some things straight: this whole debate about what malloc(0) should
- or should not do (and whether it's BDS or System V) is on the wrong track.
-
- Like it or not, AIX attempts (for the most part successfully) to conform to
- a number of standards. Some of them are formal, consensus, beaten-on-for-years
- by committee standards. These are ANSI and ISO standards. The two most
- important are
-
- ANSI C (ISO/IEC 9899)
-
- POSIX.1 (ISO/IEC 9945-1)
-
- These are neither BSD or SysV. There are several important things to remember
- about standards:
-
- 1) Standards are your guarantees of portability.
-
- 2) Standards may not say what you expect.
-
- 3) Standards may not do all you want.
-
- The malloc(0) behaviour is probably an instance of the second and third items.
- Sorry, but that's how it is. If you feel that strongly, get involved in the
- standards-making process (it needs all the help it can get :-)
-
- Large companies like the one I work for (we spend hundreds of millions of pounds
- each year on computer systems and software) put a lot of pressure on vendors to
- conform to standards so that we can write and use portable software. We want
- systems that conform to POSIX and other less formal but widely implemented
- standards like the X/Open Portability Guide.
-
- Learn about these standards. Learn FROM these standards (they can teach you a
- lot). Then use them.
-
- Neil
-
- * Neil Winton Rm 306, SSTF, BT Labs, Martlesham Heath *
- * N.Winton@axion.bt.co.uk IPSWICH IP5 7RE, UK (Tel +44 473 646079) *
- * The works of the Lord are great, sought out of all them that have *
- * pleasure therein. Psalm 111 v 2 *
- * (Found at the entrance to the Cavendish Labs, Cambridge.) *
-