!compiler: drop CONFIG_HAVE_LONG_LONG and require long long support

The matching nuttx commit removes CONFIG_HAVE_LONG_LONG; clean up the
remaining users in nuttx-apps so that "long long" is always assumed:

  - examples/noteprintf, examples/nxscope:
        unconditionally exercise the %lld / long long branch.
  - fsutils/mkfatfs/configfat.c:
        drop the 32-bit fall-back paths in mkfatfs_nfatsect12/16/32;
        always use uint64_t for the FAT-size arithmetic.
  - logging/nxscope/nxscope_chan.c:
        drop the CONFIG_HAVE_LONG_LONG guard around the 64-bit
        sample helpers.
  - netutils/ftpd, netutils/ntpclient:
        always emit the 64-bit format strings.
  - testing/fs/fstest/fstest_main.c:
        drop the parallel 32-bit verification path; keep only the
        64-bit (long long) random pattern generator.
  - system/zmodem/host/nuttx/compiler.h:
        remove the host-side CONFIG_HAVE_LONG_LONG stub macro.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2026-05-03 16:25:03 +08:00 committed by Xiang Xiao
parent 783957da07
commit 3adb14f12d
8 changed files with 8 additions and 88 deletions

View file

@ -121,13 +121,8 @@ static inline uint32_t
mkfatfs_nfatsect12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
uint32_t navailsects)
{
#ifdef CONFIG_HAVE_LONG_LONG
uint64_t denom;
uint64_t number;
#else
uint32_t denom;
uint32_t number;
#endif
/* For FAT12, the cluster number is held in a 12-bit number or 1.5 bytes
* per cluster reference. So each FAT sector will hold sectorsize/1.5
@ -156,25 +151,12 @@ mkfatfs_nfatsect12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
* navailsects > 0x55555555 - 2 * clustersize
*/
#ifndef CONFIG_HAVE_LONG_LONG
if (navailsects <= (0x55555555 - (1 << (fmt->ff_clustshift + 1))))
{
#endif
denom = (fmt->ff_nfats << 1) + fmt->ff_nfats
+ (var->fv_sectorsize << (fmt->ff_clustshift + 1));
number = (navailsects << 1) + navailsects
+ (1 << (fmt->ff_clustshift + 2))
+ (1 << (fmt->ff_clustshift + 1));
return (uint32_t)((number + denom - 1) / denom);
#ifndef CONFIG_HAVE_LONG_LONG
}
else
{
return 0;
}
#endif
denom = (fmt->ff_nfats << 1) + fmt->ff_nfats
+ (var->fv_sectorsize << (fmt->ff_clustshift + 1));
number = (navailsects << 1) + navailsects
+ (1 << (fmt->ff_clustshift + 2))
+ (1 << (fmt->ff_clustshift + 1));
return (uint32_t)((number + denom - 1) / denom);
}
/****************************************************************************
@ -201,13 +183,8 @@ static inline uint32_t
mkfatfs_nfatsect16(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
uint32_t navailsects)
{
#ifdef CONFIG_HAVE_LONG_LONG
uint64_t denom;
uint64_t number;
#else
uint32_t denom;
uint32_t number;
#endif
/* For FAT16, the cluster number is held in a 16-bit number or 2 bytes per
* cluster reference. So each FAT sector will hold sectorsize/2 cluster
@ -270,13 +247,8 @@ static inline uint32_t
mkfatfs_nfatsect32(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
uint32_t navailsects)
{
#ifdef CONFIG_HAVE_LONG_LONG
uint64_t denom;
uint64_t number;
#else
uint32_t denom;
uint32_t number;
#endif
/* For FAT32, the cluster number is held in a 32-bit number or 4 bytes per
* cluster reference. So each FAT sector will hold sectorsize/4 cluster