[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Bacula Windows Client 64bit build.


On Wednesday 30 July 2008 12:30:42 Riyas Y. wrote:
> Windows follows LLP64 standard in 64 bit machine.
>
> Type          Platform              Size
> int          32 bit windows         32 bit
> long         32 bit windows         32 bit
> size_t       32 bit windows         32 bit
> pointer      32 bit windows         32 bit
>
> int          64 bit windows         32 bit
> long         64 bit windows         32 bit
> size_t       64 bit windows         64 bit
> pointer      64 bit windows         64 bit
>
> In Linux long is 64 bit in 64 bit architecture while
> in Windows long is 32 bit in 64 bit architecture.

Fine, that doesn't make any difference to Bacula.

>
> So when we compile the bacula.dll project in visual studio after turning
> on 64 bit portability issues,
> We get data loss warnings for conversions from
> size_t to int, long
> pointer to int, long   (for eg. In smartall.c)

You will have to give *explicit* references.  In my opinion there are no 
conversion of pointer to int or long except in a few of the debug printouts 
where loss of size is not at all important.  As time goes by I have been 
making even the debug output size independent.

The fact that you are getting these warnings implies that either MS C++ is 
more picky about certain operations (a bit of a surprise because gnu g++ is 
*very* picky), or that the build is not going well because of differences in 
Microsoft header files.

>
>
> We could successfully backup and restore using the ported 64 bit windows
> bacula client.
> We are still unsure whether these warnings will cause some serious
> problems later.

I cannot tell you because I have not seen the warnings.

>
> Similarly we removed the _USE_32BIT_TIME_T preprocessor for 64 bit
> windows architecture.
> We are also unsure whether this will cause any problems.

I have never seen the _USE_32BIT_TIME_T preprocessor define, so I cannot 
comment.  In general (maybe not 100%) Bacula can accept time_t values greater 
than 32 bits.  However, removing the #define is for the moment rather useless 
because we have many years to go before time overflows.

Since you are using Microsoft C++, which we do not support, there very well 
could be some 32/64 bit problems depending on how they define things.  Using 
a different C compiler requires porting and needs very careful testing.  I 
personally would not run such a program in production without careful 
examination of a lot of things and testing for at least a month.

Regards,

Kern

>
> Regards,
> Riyas
>
> -----Original Message-----
> From: bacula-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
> [mailto:bacula-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Kern
> Sibbald
> Sent: Wednesday, July 30, 2008 2:49 PM
> To: bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: Martin Simmons
> Subject: Re: [Bacula-devel] Bacula Windows Client 64bit build.
>
> On Wednesday 30 July 2008 10:57:08 Martin Simmons wrote:
> > >>>>> On Wed, 30 Jul 2008 09:07:24 +0200, Kern Sibbald said:
> > >
> > > - In general there is nothing wrong with referencing "int"; on a 64
>
> bit
>
> > > system "int" is 64 bits.
> >
> > I hope Bacula doesn't assume that, because "int" is very likely to be
>
> 32
>
> > bits on 64 bit platforms!  The "long" type is usually 64 bits, but
>
> beware
>
> > that it is 32 bits on 64 bit Windows.
>
> No, we make no assumptions about the size of int other than it is at
> least 32
> bits.
>
> Where size really counts, as you surely know, we use our own platform
> independent definitions such as int32_t, uint32_t, int64_t, uint64_t,
> boffset_t, ...
>
>
>
>
> ------------------------------------------------------------------------
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/bacula-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.