[omniORB] string_dup() behavior

Visscher, Bruce VISSCHB@RJRT.COM
Fri Jul 12 20:34:00 2002


This is a multi-part message in MIME format.

------=_NextPartTM-000-75955710-af4d-4ce5-90b2-0dda0918fb9c
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

> The compiler options are:
> /nologo /Od /Z7 /D__WIN32__ /D__x86__ /D__NT__ /D__OSVERSION__=3D4

You need /MD.  To compile and link for debugging you need /MDd.

>From MSDN (emphasis is mine):

>/ML Single-Threaded  Causes the compiler to place the library name
> LIBC.LIB into the .OBJ file so that the linker will use LIBC.LIB
> to resolve external symbols.

  =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> This is the compiler's default action.
  =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

> LIBC.LIB does not provide multithread support.

You want neither (a) single threaded nor (b) the static run time =
library.

Single threaded implies that the library won't be thread safe.  [I don't
understand the point of having this as the default.  Responsible vendors
provide libraries that are thread safe but minimum the overhead when you
aren't multi-threaded.]

If you use the static run time library then you cannot allocate storage
on the heap (using malloc or new) from one DLL and then deallocate
the same storage from a different DLL.  This isn't practical with CORBA
so your best bet is to avoid the static run time library.  [Again, IMHO,
it is very unfortunate that the static run time library is the default.]

HTH,

Bruce

------=_NextPartTM-000-75955710-af4d-4ce5-90b2-0dda0918fb9c
Content-Type: text/plain;
	name="InterScan_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="InterScan_Disclaimer.txt"

CONFIDENTIALITY NOTE:  This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information.  If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system.  Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.


------=_NextPartTM-000-75955710-af4d-4ce5-90b2-0dda0918fb9c--