1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

Update libsndfile to 1.0.29pre2+git

This pulls in MANY (over 890) changes compared to our
from our current 1.0.24 version.
This commit is contained in:
Leland Lucius
2020-03-16 22:41:09 -05:00
parent 4ac45bb5f8
commit b749a16943
370 changed files with 39029 additions and 81333 deletions

View File

@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -103,7 +104,7 @@ show_fstat_error (void)
static char data [256] ;
STATBUF statbuf ;
int fd, mode, flags, ignored ;
int fd, mode, flags ;
if (sizeof (statbuf.st_size) != sizeof (INT64))
{ printf ("\n\nLine %d: Error, sizeof (statbuf.st_size) != 8.\n\n", __LINE__) ;
@@ -119,7 +120,7 @@ show_fstat_error (void)
{ printf ("\n\nLine %d: open() failed : %s\n\n", __LINE__, strerror (errno)) ;
return ;
} ;
ignored = write (fd, data, sizeof (data)) ;
assert (write (fd, data, sizeof (data)) > 0) ;
close (fd) ;
printf ("1) Re-open file in read/write mode and write another %d bytes at the end.\n", SIGNED_SIZEOF (data)) ;
@@ -130,7 +131,7 @@ show_fstat_error (void)
return ;
} ;
LSEEK (fd, 0, SEEK_END) ;
ignored = write (fd, data, sizeof (data)) ;
assert (write (fd, data, sizeof (data)) > 0) ;
printf ("2) Now use system (\"%s %s\") to show the file length.\n\n", dir_cmd, filename) ;
@@ -140,7 +141,7 @@ show_fstat_error (void)
strncat (data, " ", sizeof (data) - 1 - strlen (data)) ;
strncat (data, filename, sizeof (data) - 1 - strlen (data)) ;
ignored = system (data) ;
assert (system (data) >= 0) ;
puts ("") ;
printf ("3) Now use fstat() to get the file length.\n") ;
@@ -168,7 +169,7 @@ show_lseek_error (void)
static char data [256] ;
INT64 retval ;
int fd, mode, flags, ignored ;
int fd, mode, flags ;
puts ("\n64 bit lseek() test.\n--------------------") ;
@@ -179,7 +180,7 @@ show_lseek_error (void)
{ printf ("\n\nLine %d: open() failed : %s\n\n", __LINE__, strerror (errno)) ;
return ;
} ;
ignored = write (fd, data, sizeof (data)) ;
assert (write (fd, data, sizeof (data)) > 0) ;
close (fd) ;
printf ("1) Re-open file in read/write mode and write another %d bytes at the end.\n", SIGNED_SIZEOF (data)) ;
@@ -191,7 +192,7 @@ show_lseek_error (void)
} ;
LSEEK (fd, 0, SEEK_END) ;
ignored = write (fd, data, sizeof (data)) ;
assert (write (fd, data, sizeof (data)) > 0) ;
printf ("2) Now use system (\"%s %s\") to show the file length.\n\n", dir_cmd, filename) ;
@@ -201,7 +202,7 @@ show_lseek_error (void)
strncat (data, " ", sizeof (data) - 1 - strlen (data)) ;
strncat (data, filename, sizeof (data) - 1 - strlen (data)) ;
ignored = system (data) ;
assert (system (data) >= 0) ;
puts ("") ;
printf ("3) Now use lseek() to go to the end of the file.\n") ;
@@ -226,7 +227,7 @@ show_stat_fstat_error (void)
static char data [256] ;
int fd, mode, flags ;
int stat_size, fstat_size, ignored ;
int stat_size, fstat_size ;
struct stat buf ;
/* Known to fail on WinXP. */
@@ -241,7 +242,7 @@ show_stat_fstat_error (void)
return ;
} ;
ignored = write (fd, data, sizeof (data)) ;
assert (write (fd, data, sizeof (data)) > 0) ;
printf ("1) Now call stat and fstat on the file and retreive the file lengths.\n") ;
@@ -279,7 +280,7 @@ write_to_closed_file (void)
{ const char * filename = "closed_write_test.txt" ;
struct stat buf ;
FILE * file ;
int fd, ignored ;
int fd ;
puts ("\nWrite to closed file test.\n--------------------------") ;
@@ -293,7 +294,7 @@ write_to_closed_file (void)
fd = fileno (file) ;
printf ("2) Write some text via the file descriptor.\n") ;
ignored = write (fd, "a\n", 2) ;
assert (write (fd, "a\n", 2) > 0) ;
printf ("3) Now we close the file using fclose().\n") ;
fclose (file) ;