Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NDMP: Switch ndmplib to 2015 data types.
- u_short ==> uint16_t - u_long ==> uint32_t - int ==> int32_t - unsigned long long ==> uint64_t - long long ==> int64_t - unsigned long ==> uint32_t - unsigned short ==> uint16_t For GCC we now disable the following warning: -Wunused-variable -Wunused-but-set-variable -Wformat -Wenum-compare For the Solaris Studio compiler we now disable the following warnings: - E_ENUM_TYPE_MISMATCH_OP - E_ENUM_TYPE_MISMATCH_ARG - E_STATEMENT_NOT_REACHED Those warnings are not too interesting for this code as we are not going to fix those problems anyway. The original problem we encountered was the following: In solaris, the xdrrec_putlong function has the following check: if ((*lp > INT32_MAX) || (*lp < INT32_MIN)) return (FALSE); As the NDMP code assumes everywhere that long is 4 bytes, but on LP64 it is 8 bytes, we get the problem that this check triggers and we get always false back. The LP64 gets enabled when compiling your code for 64 bits on at least SPARC. We didn't see this phenomenon on 64 bits compiled code on X86 with the Solaris Studio compiler on Illumos. We fix this problem by using XDR_GETINT32 and XDR_PUTINT32 on LP64, instead of XDR_GETLONG and XDR_PUTLONG which handles 4 bytes and so works as desired. Signed-off-by: Philipp Storz <philipp.storz@bareos.com>
- Loading branch information
Marco van Wieringen
committed
Nov 16, 2015
1 parent
c57f83f
commit f4ad97c
Showing
43 changed files
with
552 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.