home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4511 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.3 KB

  1. Xref: sparky comp.os.os2.programmer:4511 comp.os.os2.apps:5621 comp.os.os2.misc:28497
  2. Path: sparky!uunet!vnet.ibm.com
  3. From: dmm@vnet.ibm.com (dave)
  4. Message-ID: <19920828.103746.499@almaden.ibm.com>
  5. Date: Fri, 28 Aug 92 13:34:30 EDT
  6. Newsgroups: comp.os.os2.programmer,comp.os.os2.apps,comp.os.os2.misc
  7. Subject: Re: C Set/2 Question in malloc
  8. Organization: IBM Canada Lab
  9. News-Software: UReply 3.0
  10. X-X-From: dmm@vnet.ibm.com (Dave Mooney)
  11. References: <1992Aug28.154836.12867@natinst.com>
  12. Lines: 24
  13.  
  14. In <1992Aug28.154836.12867@natinst.com> Uma Arunkumar writes:
  15. (hacked to get it past Nazi news software)
  16. > #include <stdio.h>
  17. > #include<malloc.h>
  18. > main()
  19. > {
  20. >   [...]
  21. >   if  (( array= malloc(50 * sizeof(long)))!= NULL)
  22. >   [...]
  23. > }
  24. >
  25. > I compile giving the command
  26. >            icc /c /w3 /o+ sample.c
  27.  
  28. If you're going to use malloc.h to pick up the prototype for malloc(),
  29. you should compile using  /Sm .  If you want to pick up the prototype no
  30. matter what, #include <stdlib.h> instead of <malloc.h>.
  31.  
  32. dave
  33.  
  34. -------------------------------------------------------------------------
  35. Dave Mooney                                              dmm@vnet.ibm.com
  36.  C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
  37.             "If you've got a blacklist, I want to be on it"
  38.