Thrift: Add "#include <cstdlib>" in a few places and s/malloc/std::malloc/
authorDavid Reiss <dreiss@apache.org>
Tue, 19 Feb 2008 22:47:29 +0000 (22:47 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 19 Feb 2008 22:47:29 +0000 (22:47 +0000)
commitd7a16f4c111599f8b78905df70f0f60af0721e08
tree4cc509319fdbaac889dca4205ca34aba274ad12c
parent2845b52f47a361d89434b3234545811e082f7716
Thrift: Add "#include <cstdlib>" in a few places and s/malloc/std::malloc/

Summary:
There were a few places where we were calling malloc/reallaoc/free without
including cstdlib (or stdlib.h).  This is broken, but it worked because
other headers that we were including included stdlib.h.  However, on a
platform where this wasn't true, it broke the Thrift build.  This change
adds the proper includes.  It also changes malloc to std::malloc (same
with realloc and free) in a few places, because that is the correct way
of doing it when you include cstdlib.

Reviewed By: mcslee

Test Plan: Compiled Thrift.

Revert Plan: ok

Other Notes:
This bug was noticed by a Thrudb user, and the patch was sent in by
Ross McFarland.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665487 13f79535-47bb-0310-9956-ffa450edef68
configure.ac
lib/cpp/src/protocol/TBinaryProtocol.cpp
lib/cpp/src/protocol/TBinaryProtocol.h
lib/cpp/src/server/TNonblockingServer.cpp
lib/cpp/src/server/TNonblockingServer.h
lib/cpp/src/transport/TFileTransport.cpp
lib/cpp/src/transport/THttpClient.cpp
lib/cpp/src/transport/TTransportUtils.cpp
lib/cpp/src/transport/TTransportUtils.h