Mercurial > jwe > octave
view libinterp/liboctinterp-build-info.h @ 30831:243b51ec9ff0 stable
Remove `time_t` from API (bug #61821).
The bit-width of `time_t` might change depending on compile time switches.
That can cause a mismatch between class declarations in public headers and the
actual alignment of the compiled classes. Avoid that problem by not using
`time_t` in (public) headers.
* build-aux/mk-octave-config-h.sh, oct-conf-post.in.h: Define OCTAVE_TIME_T to
`int64_t`. The type of `time_t` is not defined in the C/C++ standards. However
in all(?) implementations, it's either a signed 32-bit or a signed 64-bit
integer. Use a signed 64-bit integer for storing those values in Octave classes.
* other files: Use OCTAVE_TIME_T instead of `time_t`. Don't include <ctime> in
files where it's not needed.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 26 Feb 2022 13:46:48 +0100 |
parents | 796f54d4ddbf |
children |
line wrap: on
line source
//////////////////////////////////////////////////////////////////////// // // Copyright (C) 2016-2022 The Octave Project Developers // // See the file COPYRIGHT.md in the top-level directory of this // distribution or <https://octave.org/copyright/>. // // This file is part of Octave. // // Octave is free software: you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Octave is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Octave; see the file COPYING. If not, see // <https://www.gnu.org/licenses/>. // //////////////////////////////////////////////////////////////////////// #if ! defined (octave_liboctinterp_build_info_h) #define octave_liboctinterp_build_info_h 1 #include "octave-config.h" #include <string> extern OCTINTERP_API std::string liboctinterp_hg_id (void); #endif