bareos: bareos-14.2 f4ad97c2
Author | Committer | Branch | Timestamp | Parent | |
---|---|---|---|---|---|
mvwieringen | mvwieringen | bareos-14.2 | 2015-11-03 00:12 | bareos-14.2 c57f83f3 | Pending |
Changeset | 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> |
||||
mod - src/ndmp/ndma_comm_dispatch.c | Diff File | ||||
mod - src/ndmp/ndma_cops_backreco.c | Diff File | ||||
mod - src/ndmp/ndma_cops_query.c | Diff File | ||||
mod - src/ndmp/ndma_ctrl_calls.c | Diff File | ||||
mod - src/ndmp/ndma_ctrl_media.c | Diff File | ||||
mod - src/ndmp/ndma_ctst_mover.c | Diff File | ||||
mod - src/ndmp/ndma_ctst_subr.c | Diff File | ||||
mod - src/ndmp/ndma_ctst_tape.c | Diff File | ||||
mod - src/ndmp/ndma_data.c | Diff File | ||||
mod - src/ndmp/ndma_data_fh.c | Diff File | ||||
mod - src/ndmp/ndma_listmgmt.c | Diff File | ||||
mod - src/ndmp/ndma_noti_calls.c | Diff File | ||||
mod - src/ndmp/ndma_tape.c | Diff File | ||||
mod - src/ndmp/ndma_tape_simulator.c | Diff File | ||||
mod - src/ndmp/ndmagents.h | Diff File | ||||
mod - src/ndmp/ndmjob_simulator.c | Diff File | ||||
mod - src/ndmp/ndml_chan.c | Diff File | ||||
mod - src/ndmp/ndml_fhdb.c | Diff File | ||||
mod - src/ndmp/ndml_log.c | Diff File | ||||
mod - src/ndmp/ndml_media.c | Diff File | ||||
mod - src/ndmp/ndmlib.h | Diff File | ||||
mod - src/ndmp/ndmos.h | Diff File | ||||
mod - src/ndmp/ndmos_common.c | Diff File | ||||
mod - src/ndmp/ndmp0.x | Diff File | ||||
mod - src/ndmp/ndmp2.x | Diff File | ||||
mod - src/ndmp/ndmp2_translate.c | Diff File | ||||
mod - src/ndmp/ndmp2_xmt.c | Diff File | ||||
mod - src/ndmp/ndmp3.x | Diff File | ||||
mod - src/ndmp/ndmp3_translate.c | Diff File | ||||
mod - src/ndmp/ndmp3_xmt.c | Diff File | ||||
mod - src/ndmp/ndmp4.x | Diff File | ||||
mod - src/ndmp/ndmp4_translate.c | Diff File | ||||
mod - src/ndmp/ndmp4_xmt.c | Diff File | ||||
mod - src/ndmp/ndmp9.x | Diff File | ||||
mod - src/ndmp/ndmp9_xmt.c | Diff File | ||||
mod - src/ndmp/ndmp_msg_buf.h | Diff File | ||||
mod - src/ndmp/ndmp_translate.c | Diff File | ||||
mod - src/ndmp/ndmp_translate.h | Diff File | ||||
mod - src/ndmp/smc.h | Diff File | ||||
mod - src/ndmp/smc_raw.h | Diff File | ||||
mod - src/ndmp/wraplib.c | Diff File | ||||
mod - src/ndmp/wraplib.h | Diff File | ||||
mod - src/stored/ndmp_tape.c | Diff File |