Kevin,
> #ifndef UCHAR
> typedef unsigned char UCHAR;
> #endif
This does not work for typedef'ed typed, a typedef does not automatically makes something
#define'd
The correct way to do such things would be
#ifndef UCHAR_DEFINED
#define UCHAR_DEFINED
typedef unsigned char UCHAR;
#endif
Also, same #defines and typedefs in different C files is the current practice in Falcon,
that I kind of mislike.
Could not we have a FalconCommon.h where the most important #defined and typedefs will be
and include it everywhere?
This is a common practice, if one programs on unix he will #include <unistd.h> and
on windows <windows.h>.
> -----Original Message-----
> From: Kevin Lewis [mailto:klewis@stripped]
> Sent: Friday, May 30, 2008 3:30 PM
> To: 'Olav Sandstaa'
> Cc: commits@stripped; 'Hakan Kuecuekyilmaz'
> Subject: RE: commit into mysql-6.0-falcon:mysql-6.0-falcon branch
> (olav:2683) Bug#36703
>
> Olav,
>
> #include "Engine.h" is rarely ever included into a '.h' file. It is
> always included as the first include file within falcon '.cpp' files.
> I think we should continue with this basic plan. Every '.cpp' file
> that includes 'encodedDataStream.h' also includes 'engine.h' except
> ha_falcon.cpp. But engine.h should not be included in this file. That
> is how we avoid the name conflicts with the server that Jim mentioned
> last week.
>
> I think that is the reason that unsigned long is used throughout
> encodedDataStream.h instead of UCHAR. It is used on 8 different lines.
>
> In think it would be better to do the following instead of including
> the entire engine.
>
> #ifndef UCHAR
> typedef unsigned char UCHAR;
> #endif
>
> And then change all occurances of unsigned char to UCHAR in
> encodedDataStream.h to match the way they are defined in
> encodedDataStream.cpp. While you are at it, please change
>
> EncodedDataStream::EncodedDataStream(const unsigned char *data, uint
> length)
>
> in encodedDataStream.cpp also.
>
> EncodedDataStream.cpp
> EncodedRecord.cpp
> ha_falcon.cpp
> Record.cpp
> StorageConnection.cpp
> StorageDatabase.cpp
> StorageTable.cpp
> TableSpaceManager.cpp
>