* c-common.c (get_source_date_epoch): Use int64_t instead of long long.
* gcov-tool.c (profile_rewrite): Use int64_t instead of long long.
(do_rewrite): likewise.
* line-map.c (location_adhoc_data_update): Use int64_t instead of
long long.
(get_combined_adhoc_loc): Likewise.
From-SVN: r237676
+2016-06-21 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcov-tool.c (profile_rewrite): Use int64_t instead of long long.
+ (do_rewrite): likewise.
+
2016-06-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* common/config/mep/mep-common.c: Remove.
2016-06-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* common/config/mep/mep-common.c: Remove.
+2016-06-21 John David Anglin <danglin@gcc.gnu.org>
+
+ * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
+
2016-06-14 Jason Merrill <jason@redhat.com>
P0145R2: Refining Expression Order for C++.
2016-06-14 Jason Merrill <jason@redhat.com>
P0145R2: Refining Expression Order for C++.
cb_get_source_date_epoch (cpp_reader *pfile ATTRIBUTE_UNUSED)
{
char *source_date_epoch;
cb_get_source_date_epoch (cpp_reader *pfile ATTRIBUTE_UNUSED)
{
char *source_date_epoch;
char *endptr;
source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
char *endptr;
source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
return (time_t) -1;
errno = 0;
return (time_t) -1;
errno = 0;
+#if defined(INT64_T_IS_LONG)
+ epoch = strtol (source_date_epoch, &endptr, 10);
+#else
epoch = strtoll (source_date_epoch, &endptr, 10);
epoch = strtoll (source_date_epoch, &endptr, 10);
if (errno != 0 || endptr == source_date_epoch || *endptr != '\0'
|| epoch < 0 || epoch > MAX_SOURCE_DATE_EPOCH)
{
if (errno != 0 || endptr == source_date_epoch || *endptr != '\0'
|| epoch < 0 || epoch > MAX_SOURCE_DATE_EPOCH)
{
Otherwise, multiply the all counters by SCALE. */
static int
Otherwise, multiply the all counters by SCALE. */
static int
-profile_rewrite (const char *d1, const char *out, long long n_val,
+profile_rewrite (const char *d1, const char *out, int64_t n_val,
float scale, int n, int d)
{
struct gcov_info * d1_profile;
float scale, int n, int d)
{
struct gcov_info * d1_profile;
fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -o, --output <dir> Output directory\n");
fnotice (file, " -s, --scale <float or simple-frac> Scale the profile counters\n");
fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -o, --output <dir> Output directory\n");
fnotice (file, " -s, --scale <float or simple-frac> Scale the profile counters\n");
- fnotice (file, " -n, --normalize <long long> Normalize the profile\n");
+ fnotice (file, " -n, --normalize <int64_t> Normalize the profile\n");
}
static const struct option rewrite_options[] =
}
static const struct option rewrite_options[] =
int opt;
int ret;
const char *output_dir = 0;
int opt;
int ret;
const char *output_dir = 0;
-#ifdef HAVE_LONG_LONG
- long long normalize_val = 0;
-#else
int64_t normalize_val = 0;
int64_t normalize_val = 0;
float scale = 0.0;
int numerator = 1;
int denominator = 1;
float scale = 0.0;
int numerator = 1;
int denominator = 1;
break;
case 'n':
if (!do_scaling)
break;
case 'n':
if (!do_scaling)
-#if defined(HAVE_LONG_LONG)
- normalize_val = strtoll (optarg, (char **)NULL, 10);
-#elif defined(INT64_T_IS_LONG)
+#if defined(INT64_T_IS_LONG)
normalize_val = strtol (optarg, (char **)NULL, 10);
#else
normalize_val = strtol (optarg, (char **)NULL, 10);
#else
- sscanf (optarg, "%" SCNd64, &normalize_val);
+ normalize_val = strtoll (optarg, (char **)NULL, 10);
#endif
else
fnotice (stderr, "scaling cannot co-exist with normalization,"
#endif
else
fnotice (stderr, "scaling cannot co-exist with normalization,"
+2016-06-21 John David Anglin <danglin@gcc.gnu.org>
+
+ * line-map.c (location_adhoc_data_update): Use int64_t instead of
+ long long.
+ (get_combined_adhoc_loc): Likewise.
+
2016-06-01 Eduard Sanou <dhole@openmailbox.org>
* include/cpplib.h (cpp_callbacks): Add get_source_date_epoch
2016-06-01 Eduard Sanou <dhole@openmailbox.org>
* include/cpplib.h (cpp_callbacks): Add get_source_date_epoch
static int
location_adhoc_data_update (void **slot, void *data)
{
static int
location_adhoc_data_update (void **slot, void *data)
{
- *((char **) slot) += *((long long *) data);
+ *((char **) slot) += *((int64_t *) data);
set->location_adhoc_data_map.allocated)
{
char *orig_data = (char *) set->location_adhoc_data_map.data;
set->location_adhoc_data_map.allocated)
{
char *orig_data = (char *) set->location_adhoc_data_map.data;
/* Cast away extern "C" from the type of xrealloc. */
line_map_realloc reallocator = (set->reallocator
? set->reallocator
/* Cast away extern "C" from the type of xrealloc. */
line_map_realloc reallocator = (set->reallocator
? set->reallocator