| 1 |
/* |
| 2 |
mpg123config: basic config for mpg123 apps |
| 3 |
|
| 4 |
copyright 2025-2026 by the mpg123 project - free software under the terms of the LGPL 2.1 |
| 5 |
see COPYING and AUTHORS files in distribution or http://mpg123.org |
| 6 |
initially written by Thomas Orgis |
| 7 |
|
| 8 |
This includes config.h and enables 64 bit offsets where the system supports and |
| 9 |
reacts to the switch, as determined by our custom largefile detection. |
| 10 |
Include first, esp. before mpg123.h. Just use it instead of plain config.h. |
| 11 |
|
| 12 |
It also prepares use of mpg123 library headers as client code, where needed. |
| 13 |
*/ |
| 14 |
|
| 15 |
#ifndef MPG123CONFIG_H |
| 16 |
#define MPG123CONFIG_H |
| 17 |
|
| 18 |
#include "config.h" |
| 19 |
|
| 20 |
// This early settlement of _FILE_OFFSET_BITS is important to prevent |
| 21 |
// subtle bugs where you could end up with 32 bit off_t but mappings |
| 22 |
// to functions that expect 64 bit off_t. |
| 23 |
#ifndef _FILE_OFFSET_BITS |
| 24 |
#ifdef LFS_SENSITIVE |
| 25 |
#ifdef LFS_LARGEFILE_64 |
| 26 |
#define _FILE_OFFSET_BITS 64 |
| 27 |
#endif |
| 28 |
#endif |
| 29 |
#endif |
| 30 |
|
| 31 |
// Ensure that headers are switched to DLL linking mode on Windows. |
| 32 |
#if defined(_WIN32) && defined(DYNAMIC_BUILD) |
| 33 |
#define LINK_MPG123_DLL |
| 34 |
#endif |
| 35 |
|
| 36 |
#endif |