Skip to content

Commit e912e77

Browse files
author
Chad Trabant
committed
Add global LM_SIZEOF_OFF_T variable to report compile-time size of off_t
1 parent 8c562e9 commit e912e77

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2017.118: 2.19.4
2+
- Add global LM_SIZEOF_OFF_T variable that is set to the size of
3+
the off_t data type as determined at compile time.
4+
15
2017.075: 2.19.3
26
- Add missing public, global symbols to libmseed.map, thanks
37
to Elliott Sales de Andrade.

libmseed.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
extern "C" {
2929
#endif
3030

31-
#define LIBMSEED_VERSION "2.19.3"
32-
#define LIBMSEED_RELEASE "2017.075"
31+
#define LIBMSEED_VERSION "2.19.4"
32+
#define LIBMSEED_RELEASE "2017.118"
3333

3434
/* C99 standard headers */
3535
#include <stdlib.h>
@@ -118,6 +118,8 @@ extern "C" {
118118
#include <inttypes.h>
119119
#endif
120120

121+
extern int LM_SIZEOF_OFF_T; /* Size of off_t data type determined at build time */
122+
121123
#define MINRECLEN 128 /* Minimum Mini-SEED record length, 2^7 bytes */
122124
/* Note: the SEED specification minimum is 256 */
123125
#define MAXRECLEN 1048576 /* Maximum Mini-SEED record length, 2^20 bytes */

libmseed.map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
unpackdatabyteorder;
1111
unpackencodingformat;
1212
unpackencodingfallback;
13+
LM_SIZEOF_OFF_T;
1314

1415
local:
1516
*;

lmplatform.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
*
44
* Platform portability routines.
55
*
6-
* modified: 2010.304
6+
* modified: 2017.118
77
***************************************************************************/
88

99
/* Define _LARGEFILE_SOURCE to get ftello/fseeko on some systems (Linux) */
1010
#define _LARGEFILE_SOURCE 1
1111

1212
#include "libmseed.h"
1313

14+
/* Size of off_t data type as determined at build time */
15+
int LM_SIZEOF_OFF_T = sizeof(off_t);
16+
1417
/***************************************************************************
1518
* lmp_ftello:
1619
*

0 commit comments

Comments
 (0)