@@ -118,7 +118,7 @@ move_file_block(NC *ncp,
118118 get_size = pread (fd , buf , chunk_size , off_from );
119119 if (get_size < 0 ) {
120120 fprintf (stderr ,
121- "Error at %s line %d: pread file %s offset %lld size %zd (%s)\n" ,
121+ "Error at %s line %d: pread file %s offset " OFFFMT " size %zd (%s)\n" ,
122122 __func__ ,__LINE__ ,path ,off_from ,chunk_size ,strerror (errno ));
123123 DEBUG_RETURN_ERROR (NC_EREAD )
124124 }
@@ -138,7 +138,7 @@ move_file_block(NC *ncp,
138138 put_size = pwrite (fd , buf , get_size , off_to );
139139 if (put_size < 0 ) {
140140 fprintf (stderr ,
141- "Error at %s line %d: pwrite file %s offset %lld size %zd (%s)\n" ,
141+ "Error at %s line %d: pwrite file %s offset " OFFFMT " size %zd (%s)\n" ,
142142 __func__ ,__LINE__ ,path ,off_to ,get_size ,strerror (errno ));
143143 DEBUG_RETURN_ERROR (NC_EREAD )
144144 }
@@ -953,7 +953,7 @@ ncmpio_NC_check_voffs(NC *ncp)
953953 NC_var * varp = ncp -> vars .value [i ];
954954 if (varp -> begin < ncp -> xsz ) {
955955 if (ncp -> safe_mode ) {
956- printf ("Variable %s begin offset (%lld ) is less than file header extent (%lld )\n" ,
956+ printf ("Variable %s begin offset (" OFFFMT " ) is less than file header extent (" OFFFMT " )\n" ,
957957 varp -> name , varp -> begin , ncp -> xsz );
958958 }
959959 NCI_Free (var_off_len );
@@ -982,7 +982,7 @@ ncmpio_NC_check_voffs(NC *ncp)
982982 if (ncp -> safe_mode ) {
983983 NC_var * var_cur = ncp -> vars .value [var_off_len [i ].ID ];
984984 NC_var * var_prv = ncp -> vars .value [var_off_len [i - 1 ].ID ];
985- printf ("Variable %s begin offset (%lld ) overlaps variable %s (begin=%lld , length=%lld )\n" ,
985+ printf ("Variable %s begin offset (" OFFFMT " ) overlaps variable %s (begin=" OFFFMT " , length=" OFFFMT " )\n" ,
986986 var_cur -> name , var_cur -> begin , var_prv -> name , var_prv -> begin , var_prv -> len );
987987 }
988988 NCI_Free (var_off_len );
@@ -994,7 +994,7 @@ ncmpio_NC_check_voffs(NC *ncp)
994994
995995 if (ncp -> begin_rec < max_var_end ) {
996996 if (ncp -> safe_mode )
997- printf ("Record variable section begin (%lld ) is less than fixed-size variable section end (%lld )\n" ,
997+ printf ("Record variable section begin (" OFFFMT " ) is less than fixed-size variable section end (" OFFFMT " )\n" ,
998998 ncp -> begin_rec , max_var_end );
999999 NCI_Free (var_off_len );
10001000 DEBUG_RETURN_ERROR (NC_ENOTNC )
@@ -1030,7 +1030,7 @@ ncmpio_NC_check_voffs(NC *ncp)
10301030 if (ncp -> safe_mode ) {
10311031 NC_var * var_cur = ncp -> vars .value [var_off_len [i ].ID ];
10321032 NC_var * var_prv = ncp -> vars .value [var_off_len [i - 1 ].ID ];
1033- printf ("Variable %s begin offset (%lld ) overlaps variable %s (begin=%lld , length=%lld )\n" ,
1033+ printf ("Variable %s begin offset (" OFFFMT " ) overlaps variable %s (begin=" OFFFMT " , length=" OFFFMT " )\n" ,
10341034 var_cur -> name , var_cur -> begin , var_prv -> name , var_prv -> begin , var_prv -> len );
10351035 }
10361036 NCI_Free (var_off_len );
@@ -1052,10 +1052,10 @@ ncmpio_NC_check_voffs(NC *ncp)
10521052 if (varp -> begin < prev_off ) {
10531053 if (ncp -> safe_mode ) {
10541054 if (i == 0 )
1055- printf ("Variable \"%s\" begin offset (%lld ) is less than header extent (%lld )\n" ,
1055+ printf ("Variable \"%s\" begin offset (" OFFFMT " ) is less than header extent (" OFFFMT " )\n" ,
10561056 varp -> name , varp -> begin , prev_off );
10571057 else
1058- printf ("Variable \"%s\" begin offset (%lld ) is less than previous variable \"%s\" end offset (%lld )\n" ,
1058+ printf ("Variable \"%s\" begin offset (" OFFFMT " ) is less than previous variable \"%s\" end offset (" OFFFMT " )\n" ,
10591059 varp -> name , varp -> begin , ncp -> vars .value [prev ]-> name , prev_off );
10601060 }
10611061 DEBUG_RETURN_ERROR (NC_ENOTNC )
@@ -1066,7 +1066,7 @@ ncmpio_NC_check_voffs(NC *ncp)
10661066
10671067 if (ncp -> begin_rec < prev_off ) {
10681068 if (ncp -> safe_mode )
1069- printf ("Record variable section begin offset (%lld ) is less than fixed-size variable section end offset (%lld )\n" ,
1069+ printf ("Record variable section begin offset (" OFFFMT " ) is less than fixed-size variable section end offset (" OFFFMT " )\n" ,
10701070 ncp -> begin_rec , prev_off );
10711071 DEBUG_RETURN_ERROR (NC_ENOTNC )
10721072 }
@@ -1083,13 +1083,13 @@ ncmpio_NC_check_voffs(NC *ncp)
10831083
10841084 if (varp -> begin < prev_off ) {
10851085 if (ncp -> safe_mode ) {
1086- printf ("Variable \"%s\" begin offset (%lld ) is less than previous variable end offset (%lld )\n" ,
1086+ printf ("Variable \"%s\" begin offset (" OFFFMT " ) is less than previous variable end offset (" OFFFMT " )\n" ,
10871087 varp -> name , varp -> begin , prev_off );
10881088 if (i == 0 )
1089- printf ("Variable \"%s\" begin offset (%lld ) is less than record variable section begin offset (%lld )\n" ,
1089+ printf ("Variable \"%s\" begin offset (" OFFFMT " ) is less than record variable section begin offset (" OFFFMT " )\n" ,
10901090 varp -> name , varp -> begin , prev_off );
10911091 else
1092- printf ("Variable \"%s\" begin offset (%lld ) is less than previous variable \"%s\" end offset (%lld )\n" ,
1092+ printf ("Variable \"%s\" begin offset (" OFFFMT " ) is less than previous variable \"%s\" end offset (" OFFFMT " )\n" ,
10931093 varp -> name , varp -> begin , ncp -> vars .value [prev ]-> name , prev_off );
10941094 }
10951095 DEBUG_RETURN_ERROR (NC_ENOTNC )
@@ -1312,9 +1312,9 @@ ncmpio__enddef(void *ncdp,
13121312 /* reflect the hint changes to the MPI info object, so the user can inquire
13131313 * what the true hint values are being used
13141314 */
1315- sprintf (value , "%lld" , ncp -> v_align );
1315+ sprintf (value , OFFFMT , ncp -> v_align );
13161316 MPI_Info_set (ncp -> mpiinfo , "nc_var_align_size" , value );
1317- sprintf (value , "%lld" , ncp -> r_align );
1317+ sprintf (value , OFFFMT , ncp -> r_align );
13181318 MPI_Info_set (ncp -> mpiinfo , "nc_record_align_size" , value );
13191319
13201320#ifdef ENABLE_SUBFILING
0 commit comments