portability issue with gmtime method in utime_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



utime.h defines a utime_t class with a gmtime() method, and also calls the library function gmtime_r().

mingw implements gmtime_r() as a macro in pthread.h that in turn calls gmtime(), and gcc bails because it gets confused about which is being called:
 
utime.h: In member function 'utime_t utime_t::round_to_minute()':
utime.h:113:5: error: no matching function for call to 'utime_t::gmtime(time_t*)'
utime.h:113:5: note: candidate is:
utime.h:146:12: note: std::ostream& utime_t::gmtime(std::ostream&) const
utime.h:146:12: note:   no known conversion for argument 1 from 'time_t* {aka long long int*}' to 'std::ostream& {aka std::basic_ostream<char>&}'

Same for asctime and localtime. I can work around it by creating a static method that in turn calls ::gmtime() etc, but I'm not sure that's the best way to do it.

There's a bunch of other build errors in there too so it may be a lost cause...

James
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux