mpg123-1.32.1

This commit is contained in:
Ozkan Sezer
2023-09-24 23:11:10 +03:00
parent 2279cffc0f
commit de1a534fe6
16 changed files with 1024 additions and 46 deletions

View File

@@ -509,7 +509,7 @@ size_t INT123_unintr_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *st
#ifndef NO_CATCHSIGNAL
#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H)
void (*INT123_catchsignal(int signum, void(*handler)()))()
void (*INT123_catchsignal(int signum, void(*handler)(int)))(int)
{
struct sigaction new_sa;
struct sigaction old_sa;
@@ -523,7 +523,7 @@ void (*INT123_catchsignal(int signum, void(*handler)()))()
sigemptyset(&new_sa.sa_mask);
new_sa.sa_flags = 0;
if(sigaction(signum, &new_sa, &old_sa) == -1)
return ((void (*)()) -1);
return ((void (*)(int)) -1); // Not rather NULL?
return (old_sa.sa_handler);
}
#endif

View File

@@ -329,7 +329,7 @@ size_t INT123_unintr_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *st
#include "true.h"
#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H)
void (*INT123_catchsignal(int signum, void(*handler)()))();
void (*INT123_catchsignal(int signum, void(*handler)(int)))(int);
#endif
#endif

View File

@@ -2196,10 +2196,6 @@ MPG123_EXPORT int mpg123_replace_reader( mpg123_handle *mh
, off_t (*r_lseek)(int, off_t, int)
);
/* TODO: Implement replace_read_handle() as thin wrapper over mpg123_reader(),
triggering the same further code paths, include mpg123_open_handle().
And: Implement the below functions, MPG123_PORTABLE_API, at all. */
/** Replace I/O functions with your own ones operating on some kind of
* handle instead of integer descriptors.
* The handle is a void pointer, so you can pass any data you want...

View File

@@ -63,7 +63,7 @@ int outburst = 32768;
Another forked buffer process will have its on value. */
static int intflag = FALSE;
static void catch_interrupt (void)
static void catch_interrupt (int sig)
{
intflag = TRUE;
}
@@ -75,7 +75,7 @@ static int read_record(out123_handle *ao
, int who, void **buf, byte *prebuf, int *preoff, int presize, size_t *recsize);
static int buffer_loop(out123_handle *ao);
static void catch_child(void)
static void catch_child(int sig)
{
/* Disabled for now. We do not really need that.
Rather get return status in a controlled way in INT123_buffer_exit(). */

View File

@@ -186,7 +186,7 @@ void set_intflag()
}
#if !defined(WIN32) && !defined(GENERIC)
static void catch_interrupt(void)
static void catch_interrupt(int sig)
{
intflag = TRUE;
}
@@ -203,11 +203,11 @@ static void handle_fatal_msg(const char *msg)
fprintf(stderr, "%s", msg);
handle_fatal();
}
static void catch_fatal_term(void)
static void catch_fatal_term(int sig)
{
handle_fatal_msg("\nmpg123: death by SIGTERM\n");
}
static void catch_fatal_pipe(void)
static void catch_fatal_pipe(int sig)
{
/* If the SIGPIPE is because of piped stderr, trying to write
in the signal handler hangs the program. */

View File

@@ -1271,7 +1271,7 @@ int play_frame(void)
}
#if !defined(WIN32) && !defined(GENERIC)
static void catch_interrupt(void)
static void catch_interrupt(int sig)
{
intflag = TRUE;
}

View File

@@ -16,7 +16,7 @@
// only single spaces as separator to ease parsing by build scripts
#define MPG123_MAJOR 1
#define MPG123_MINOR 32
#define MPG123_PATCH 0
#define MPG123_PATCH 1
// Don't get too wild with that to avoid confusing m4. No brackets.
// Also, it should fit well into a sane file name for the tarball.
#define MPG123_SUFFIX ""