home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / programm / win32 / 2021 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.4 KB

  1. Path: sparky!uunet!noc.near.net!inmet!bu.edu!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!wupost!gumby!yale!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!uknet!cvedg!medusa.prime.com!matt
  2. From: matt@CIS.Prime.COM (Matt Judenfreund)
  3. Newsgroups: comp.os.ms-windows.programmer.win32
  4. Subject: libcmt.lib & errno
  5. Keywords: libcmt libc errno multi-threaded
  6. Message-ID: <1992Nov17.194903.14356@medusa.prime.com>
  7. Date: 17 Nov 92 19:49:03 GMT
  8. Sender: news@medusa.prime.com
  9. Reply-To: matt@CIS.Prime.COM
  10. Organization: Computervision R&D Ltd
  11. Lines: 20
  12.  
  13. Is there any info on how/when to use libcmt.lib (the multi-threaded C library)
  14. and libc.lib (non=multi-threaded)?
  15.  
  16. I have been using the libcmt.lib, (by virtue of the standard makefile) and
  17. everything was fine until I tried to access errno.  If you do that two things
  18. happen:
  19.  (1) the linker starts whining about multiple definitions of variables
  20. (one from libcmt.lib and the other from libc.lib).
  21.  (2) errno remains resolutely stuck at 0.
  22.  
  23. So perusing <errno.h> I noticed that if _MT is #defined then errno is re-defined
  24. to use a function _errno.  Presuming that _MT stood for multi-threaded I dutifully
  25. rebuilt with /D_MT and that worked fine.
  26.  
  27. Is that safe/normal?  It certainly doesn't seem like it - if it was than I would
  28. expect _MT to be defined as standard for the C compiler. 
  29.  
  30. (I am currently using the July version of NT)
  31.  
  32. Matt
  33.