home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aix / 13210 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.1 KB

  1. 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
  2. From: nwinton@axion.bt.co.uk (Neil Winton)
  3. Newsgroups: comp.unix.aix
  4. Subject: malloc, AIX, Standards and Portability
  5. Keywords: malloc posix x/open standards ansi
  6. Message-ID: <C0qM70.10p@axion.bt.co.uk>
  7. Date: 12 Jan 93 10:52:11 GMT
  8. Sender: news@axion.bt.co.uk
  9. Organization: BT Laboratories
  10. Lines: 41
  11.  
  12. Let's get some things straight: this whole debate about what malloc(0) should
  13. or should not do (and whether it's BDS or System V) is on the wrong track.
  14.  
  15. Like it or not, AIX attempts (for the most part successfully) to conform to
  16. a number of standards.  Some of them are formal, consensus, beaten-on-for-years
  17. by committee standards.  These are ANSI and ISO standards.  The two most
  18. important are
  19.  
  20.     ANSI C (ISO/IEC 9899)
  21.  
  22.     POSIX.1 (ISO/IEC 9945-1)
  23.  
  24. These are neither BSD or SysV.  There are several important things to remember
  25. about standards:
  26.  
  27.     1) Standards are your guarantees of portability.
  28.  
  29.     2) Standards may not say what you expect.
  30.  
  31.     3) Standards may not do all you want.
  32.  
  33. The malloc(0) behaviour is probably an instance of the second and third items. 
  34. Sorry, but that's how it is.  If you feel that strongly, get involved in the
  35. standards-making process (it needs all the help it can get :-)
  36.  
  37. Large companies like the one I work for (we spend hundreds of millions of pounds
  38. each year on computer systems and software) put a lot of pressure on vendors to
  39. conform to standards so that we can write and use portable software.  We want
  40. systems that conform to POSIX and other less formal but widely implemented
  41. standards like the X/Open Portability Guide.
  42.  
  43. Learn about these standards.  Learn FROM these standards (they can teach you a
  44. lot).  Then use them.
  45.  
  46.     Neil
  47.  
  48. *   Neil Winton            Rm 306, SSTF, BT Labs, Martlesham Heath    *
  49. *   N.Winton@axion.bt.co.uk    IPSWICH IP5 7RE, UK   (Tel +44 473 646079) *
  50. *    The works of the Lord are great, sought out of all them that have     *
  51. *    pleasure therein.                     Psalm 111 v 2     *
  52. *        (Found at the entrance to the Cavendish Labs, Cambridge.)         *
  53.