mirror of
http://mpg123.de/trunk/.git
synced 2025-10-26 15:31:15 +03:00
Hackery for more standards conformity, triggered by bugs 227 and 228.
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4021 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
10
NEWS
10
NEWS
@@ -1,3 +1,13 @@
|
|||||||
|
1.23.4
|
||||||
|
------
|
||||||
|
- Build fixes (bugs 227 and 228), another take on libc feature test macros.
|
||||||
|
This helps OSX, mainly.
|
||||||
|
- ./configure --enable-nagging does something also without --enable-debug,
|
||||||
|
explictly triggers -std=c89, too.
|
||||||
|
- Some fixup to make things work in pedantic C89 mode again.
|
||||||
|
It really might be time to swich on some serious C99 for the next release,
|
||||||
|
since there's a followup standard to _that_ which we can ignore now.
|
||||||
|
|
||||||
1.23.3:
|
1.23.3:
|
||||||
-------
|
-------
|
||||||
- mpg123: Man page fixes by ESR.
|
- mpg123: Man page fixes by ESR.
|
||||||
|
|||||||
11
configure.ac
11
configure.ac
@@ -8,7 +8,7 @@ dnl Require autoconf version >= 2.57
|
|||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
|
|
||||||
dnl ############# Initialisation
|
dnl ############# Initialisation
|
||||||
AC_INIT([mpg123], [1.23.3], [maintainer@mpg123.org])
|
AC_INIT([mpg123], [1.23.4], [maintainer@mpg123.org])
|
||||||
dnl Increment API_VERSION when the API gets changes (new functions).
|
dnl Increment API_VERSION when the API gets changes (new functions).
|
||||||
|
|
||||||
dnl libmpg123
|
dnl libmpg123
|
||||||
@@ -1223,9 +1223,12 @@ if test x"$debugging" = xenabled; then
|
|||||||
# gcc specific...
|
# gcc specific...
|
||||||
if test x"$GCC" = xyes; then
|
if test x"$GCC" = xyes; then
|
||||||
ADD_CFLAGS="$ADD_CFLAGS -Wall -fno-strict-aliasing"
|
ADD_CFLAGS="$ADD_CFLAGS -Wall -fno-strict-aliasing"
|
||||||
if test x"$nagging" = xenabled; then
|
fi
|
||||||
ADD_CFLAGS="$ADD_CFLAGS -Werror -pedantic -DPLAIN_C89"
|
fi
|
||||||
fi
|
# gcc specific...
|
||||||
|
if test x"$GCC" = xyes; then
|
||||||
|
if test x"$nagging" = xenabled; then
|
||||||
|
ADD_CFLAGS="$ADD_CFLAGS -Werror -std=c89 -pedantic -DPLAIN_C89"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,26 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
/* Needed for strdup(), in strict mode ... */
|
/*
|
||||||
#ifndef _XOPEN_SOURCE
|
It starts with strdup(), gets interesting with MAP_ANON:
|
||||||
#define _XOPEN_SOURCE 500
|
Trying to enable some API without excluding other parts.
|
||||||
|
Do _not_ just specify POSIX as that _excludes_ API (on
|
||||||
|
some non-glibc platform at least).
|
||||||
|
*/
|
||||||
|
#define _BSD_SOURCE
|
||||||
|
#define _SVID_SOURCE
|
||||||
|
/* Glibc replaces the above with the below.
|
||||||
|
Also, it's possibly defined already. */
|
||||||
|
#ifndef _DEFAULT_SOURCE
|
||||||
|
#define _DEFAULT_SOURCE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For --nagging compilation with -std=c89, we need
|
||||||
|
to disable the inline keyword. */
|
||||||
|
#ifdef PLAIN_C89
|
||||||
|
#ifndef inline
|
||||||
|
#define inline
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|||||||
@@ -7,10 +7,9 @@
|
|||||||
old timestamp: Tue Apr 8 07:15:13 MET DST 1997
|
old timestamp: Tue Apr 8 07:15:13 MET DST 1997
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "getlopt.h"
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
#include "getlopt.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
int loptind = 1; /* index in argv[] */
|
int loptind = 1; /* index in argv[] */
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
initially written by Juergen Schoew and Tomas Oegren
|
initially written by Juergen Schoew and Tomas Oegren
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "out123_int.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/* use AUDIO_BSIZE to set the msec for audio buffering in Ultimedia library
|
/* use AUDIO_BSIZE to set the msec for audio buffering in Ultimedia library
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "out123_int.h"
|
#include "out123_int.h"
|
||||||
#include "audio.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
/* make ALSA 0.9.x compatible to the 1.0.x API */
|
/* make ALSA 0.9.x compatible to the 1.0.x API */
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
There's always a deadlock. --ThOr
|
There's always a deadlock. --ThOr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <jack/jack.h>
|
#include <jack/jack.h>
|
||||||
@@ -24,7 +26,6 @@
|
|||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
|
||||||
#include "out123_int.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
initially written by Petr Stehlik
|
initially written by Petr Stehlik
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
|
|
||||||
/* derived from LINUX, VOXWARE and SUN for MiNT Audio Device by Petr Stehlik */
|
/* derived from LINUX, VOXWARE and SUN for MiNT Audio Device by Petr Stehlik */
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "out123_int.h"
|
|
||||||
#include <ioctl.h>
|
#include <ioctl.h>
|
||||||
#include <audios.h>
|
#include <audios.h>
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
initially written by Samuel Audet
|
initially written by Samuel Audet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
|
|
||||||
#define INCL_OS2MM
|
#define INCL_OS2MM
|
||||||
#define INCL_DOS
|
#define INCL_DOS
|
||||||
#define INCL_VIO
|
#define INCL_VIO
|
||||||
@@ -15,10 +17,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
/* I guess this #ifndef could be removed now... */
|
|
||||||
#ifndef MPG123_INCLUDED
|
|
||||||
#include "out123_int.h"
|
|
||||||
#endif
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/* complementary audio parameters */
|
/* complementary audio parameters */
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
initially written by Michael Hipp
|
initially written by Michael Hipp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "out123_int.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_LINUX_SOUNDCARD_H
|
#ifdef HAVE_LINUX_SOUNDCARD_H
|
||||||
#include <linux/soundcard.h>
|
#include <linux/soundcard.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,12 +6,9 @@
|
|||||||
initially written by Nicholas J. Humfrey
|
initially written by Nicholas J. Humfrey
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#include <portaudio.h>
|
|
||||||
|
|
||||||
#include "audio.h"
|
|
||||||
#include "out123_int.h"
|
#include "out123_int.h"
|
||||||
|
#include <math.h>
|
||||||
|
#include <portaudio.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
initially written by Nicholas J. Humfrey
|
initially written by Nicholas J. Humfrey
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -13,10 +15,6 @@
|
|||||||
#include <pulse/simple.h>
|
#include <pulse/simple.h>
|
||||||
#include <pulse/error.h>
|
#include <pulse/error.h>
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "out123_int.h"
|
|
||||||
#include "audio.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
static int open_pulse(out123_handle *ao)
|
static int open_pulse(out123_handle *ao)
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "out123_int.h"
|
#include "out123_int.h"
|
||||||
#include "audio.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -6,12 +6,11 @@
|
|||||||
initially written by Nicholas J. Humfrey
|
initially written by Nicholas J. Humfrey
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "out123_int.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "audio.h"
|
|
||||||
#include "out123_int.h"
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,11 +6,9 @@
|
|||||||
initially written (as it seems) by Thomas Woerner
|
initially written (as it seems) by Thomas Woerner
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#include <dmedia/audio.h>
|
|
||||||
|
|
||||||
#include "out123_int.h"
|
#include "out123_int.h"
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <dmedia/audio.h>
|
||||||
#include "errno.h"
|
#include "errno.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "out123_int.h"
|
#include "out123_int.h"
|
||||||
#include "audio.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <tinyalsa/asoundlib.h>
|
#include <tinyalsa/asoundlib.h>
|
||||||
|
|||||||
2
src/libout123/modules/win32_wasapi.c
Executable file → Normal file
2
src/libout123/modules/win32_wasapi.c
Executable file → Normal file
@@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
based on win32.c
|
based on win32.c
|
||||||
*/
|
*/
|
||||||
|
#include "out123_int.h"
|
||||||
#define COBJMACROS 1
|
#define COBJMACROS 1
|
||||||
#define _WIN32_WINNT 0x601
|
#define _WIN32_WINNT 0x601
|
||||||
#include <initguid.h>
|
#include <initguid.h>
|
||||||
#include "out123_int.h"
|
|
||||||
#include <audioclient.h>
|
#include <audioclient.h>
|
||||||
#include <mmdeviceapi.h>
|
#include <mmdeviceapi.h>
|
||||||
#include <avrt.h>
|
#include <avrt.h>
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ static const char* name[FIELDS] =
|
|||||||
see print_id3 for what goes left or right.
|
see print_id3 for what goes left or right.
|
||||||
Choose namelen[0] >= namelen[1]! */
|
Choose namelen[0] >= namelen[1]! */
|
||||||
static const int namelen[2] = {7, 6};
|
static const int namelen[2] = {7, 6};
|
||||||
|
/* Overhead is Name + ": " and also plus " " for right column. */
|
||||||
|
/* pedantic C89 does not like:
|
||||||
|
const int overhead[2] = { namelen[0]+2, namelen[1]+4 }; */
|
||||||
|
static const int overhead[2] = { 9, 10 };
|
||||||
|
|
||||||
static void utf8_ascii(mpg123_string *dest, mpg123_string *source);
|
static void utf8_ascii(mpg123_string *dest, mpg123_string *source);
|
||||||
/* Copy UTF-8 string or melt it down to ASCII, also returning the character length. */
|
/* Copy UTF-8 string or melt it down to ASCII, also returning the character length. */
|
||||||
@@ -307,8 +311,6 @@ void print_id3_tag(mpg123_handle *mh, int long_id3, FILE *out)
|
|||||||
So we will skip tags not set, and try to show them in two parallel
|
So we will skip tags not set, and try to show them in two parallel
|
||||||
columns if they are short, which is by far the most common case. */
|
columns if they are short, which is by far the most common case. */
|
||||||
int linelimit;
|
int linelimit;
|
||||||
/* Overhead is Name + ": " and also plus " " for right column. */
|
|
||||||
const int overhead[2] = { namelen[0]+2, namelen[1]+4 };
|
|
||||||
int climit[2];
|
int climit[2];
|
||||||
|
|
||||||
/* Adapt formatting width to terminal if possible. */
|
/* Adapt formatting width to terminal if possible. */
|
||||||
|
|||||||
Reference in New Issue
Block a user