Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions dev/externals/fastconv/fconv-fftw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ extern "C"
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/timeb.h>


#ifdef _WIN32
#define <sys/timeb.h>
#endif

#ifdef _DEBUG
#include <assert.h>
#endif
Expand Down Expand Up @@ -114,13 +117,21 @@ void usage(const char *progname)


double
timer()
timer() //TODO: Refactor duplicated code
{
struct timeb now;
double secs, ticks;
ftime(&now);
ticks = (double)now.millitm/(1000.0);
secs = (double) now.time;

#ifdef _WIN32
struct timeb now;
ftime(&now);
ticks = (double) now.millitm*1e-4;
secs = (double) now.time;
#else
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts); //TODO: Handle this erroring
ticks = (double) ts.tv_nsec*1e-9;
secs = (double) ts.tv_sec;
#endif

return secs + ticks;
}
Expand Down
23 changes: 17 additions & 6 deletions dev/externals/fastconv/fconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ extern "C"
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/timeb.h>


#ifdef _DEBUG
#include <assert.h>
#endif

#ifdef _WIN32
#include <sys/timeb.h>
#endif

#ifdef unix
#include <ctype.h>
int stricmp(const char *a, const char *b);
Expand Down Expand Up @@ -108,13 +111,21 @@ void usage(const char *progname)


double
timer()
timer() //TODO: Refactor duplicated code
{
struct timeb now;
double secs, ticks;
ftime(&now);
ticks = (double)now.millitm/(1000.0);
secs = (double) now.time;

#ifdef _WIN32
struct timeb now;
ftime(&now);
ticks = (double) now.millitm*1e-4;
secs = (double) now.time;
#else
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts); //TODO: Handle this erroring
ticks = (double) ts.tv_nsec*1e-9;
secs = (double) ts.tv_sec;
#endif

return secs + ticks;
}
Expand Down
2 changes: 1 addition & 1 deletion dev/externals/mctools/chxformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ char* guidnames[] = {"PCM","PCM FLOAT","AMB PCM","AMB FLOAT"};
#define REVWBYTES(t) ( (((t)&0xff) << 8) | (((t)>>8) &0xff) )
#define TAG(a,b,c,d) ( ((a)<<24) | ((b)<<16) | ((c)<<8) | (d) )

#ifdef linux
#ifdef __GLIBC__
#define POS64(x) (x.__pos)
#else
#define POS64(x) (x)
Expand Down
2 changes: 1 addition & 1 deletion dev/externals/mctools/copysf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
#include <ctype.h>
#ifdef _WIN32
#include <malloc.h> //RWD.6.5.99
#include <sys/timeb.h>
#endif
#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <portsf.h>

#define VERSION "Revision: 2.1.1 2020 "
Expand Down
5 changes: 4 additions & 1 deletion dev/externals/mctools/fmdcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
#include <math.h>
#include <memory.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <portsf.h>
#include "fmdcode.h"

#ifdef _WIM32
#include <sys/timeb.h>
#endif

#ifdef unix
/* in portsf.lib */
extern int stricmp(const char *a, const char *b);
Expand Down
5 changes: 4 additions & 1 deletion dev/externals/mctools/nmix.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@
#include <string.h>
#include <math.h>
#include <memory.h>
#include <sys/timeb.h>
#include "portsf.h"

#ifdef _WIN32
#include <sys/timeb.h>
#endif

#ifdef unix
/* in portsf.lib */
extern int stricmp(const char *a, const char *b);
Expand Down
1 change: 0 additions & 1 deletion dev/externals/paprogs/paplay/paplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#ifdef unix

#include <sys/types.h>
#include <sys/timeb.h>
#endif

#include <signal.h>
Expand Down
1 change: 0 additions & 1 deletion dev/externals/paprogs/pvplay/pvplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

#ifdef unix
#include <sys/types.h>
#include <sys/timeb.h>
#include <sys/time.h>
#include <pthread.h>
#include <ctype.h>
Expand Down
1 change: 0 additions & 1 deletion dev/externals/paprogs/recsf/recsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#ifdef unix

#include <sys/types.h>
#include <sys/timeb.h>
#endif

#include <signal.h>
Expand Down
2 changes: 1 addition & 1 deletion dev/externals/portsf/portsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int stricmp(const char *a, const char *b);
int strnicmp(const char *a, const char *b, const int length);
#endif

#ifdef linux
#ifdef __GLIBC__
#define POS64(x) (x.__pos)
#else
#define POS64(x) (x)
Expand Down
4 changes: 2 additions & 2 deletions dev/newsfsys/pvfileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#ifdef unix
#include <unistd.h>
#define O_BINARY (0)
#define _S_IWRITE S_IWRITE
#define _S_IREAD S_IREAD
#define _S_IWRITE S_IWUSR
#define _S_IREAD S_IRUSR
#endif

#ifdef _DEBUG
Expand Down
6 changes: 3 additions & 3 deletions dev/newsfsys/sfsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ int CDP_COM_READY = 0; /*global flag, ah well...(define in alias.h will access
#define _O_CREAT O_CREAT
#define _O_TRUNC O_TRUNC
#define _O_EXCL O_EXCL
#define _S_IWRITE S_IWRITE
#define _S_IREAD S_IREAD
#define _S_IWRITE S_IWUSR
#define _S_IREAD S_IRUSR

#define chsize ftruncate
#endif
Expand Down Expand Up @@ -280,7 +280,7 @@ extern int sampsize[];
#define sizeof_WFMTEX (40)


#ifdef linux
#ifdef __GLIBC__
#define POS64(x) (x.__pos)
#else
#define POS64(x) (x)
Expand Down
4 changes: 2 additions & 2 deletions dev/pvxio2/pvfileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#ifdef unix
#include <unistd.h>
#define O_BINARY (0)
#define _S_IWRITE S_IWRITE
#define _S_IREAD S_IREAD
#define _S_IWRITE S_IWUSR
#define _S_IREAD S_IRUSR
#endif

#ifdef _DEBUG
Expand Down
6 changes: 3 additions & 3 deletions dev/sfsys/sfsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ int CDP_COM_READY = 0; /*global flag, ah well...(define in alias.h will access
#define _O_CREAT O_CREAT
#define _O_TRUNC O_TRUNC
#define _O_EXCL O_EXCL
#define _S_IWRITE S_IWRITE
#define _S_IREAD S_IREAD
#define _S_IWRITE S_IWUSR
#define _S_IREAD S_IRUSR

#define chsize ftruncate
#endif
Expand Down Expand Up @@ -274,7 +274,7 @@ extern int sampsize[];
#define sizeof_WFMTEX (40)


#ifdef linux
#ifdef __GLIBC__
#define POS64(x) (x.__pos)
#else
#define POS64(x) (x)
Expand Down
11 changes: 11 additions & 0 deletions libaaio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Notes on `./configure`:
If `./configure` ever fails at checking your compiler, it's probably because your compiler doesn't support implicit `int` declarations. To fix it, run:
```sh
sed -i "1083s/^/int /" configure
```
.
P.S.: Also look at updating the `config.guess` and `config.sub` files as those are obsolete and could fail you. Run:
```sh
rm config.guess && rm config.sub && wget https://git.savannah.gnu.org/cgit/config.git/plain/config.guess && wget https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
```
to fix the issue.