summaryrefslogtreecommitdiff
path: root/audio/ccaudio2/files/patch-utils_audiotool.cpp
blob: 86ef1f1696c0428672902f0e5b9d3b2be5ec7bc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- utils/audiotool.cpp.orig	2011-03-21 08:16:40.000000000 +0100
+++ utils/audiotool.cpp	2013-02-11 15:13:11.000000000 +0100
@@ -20,6 +20,13 @@
 #include <config.h>
 #ifdef  HAVE_ENDIAN_H
 #include <endian.h>
+#else
+#ifdef __FreeBSD__
+#include <sys/endian.h>
+#define __LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
+#define __BIG_ENDIAN    (_BYTE_ORDER == _BIG_ENDIAN)
+#define __BYTE_ORDER _BYTE_ORDER
+#endif
 #endif
 
 #if !defined(__BIG_ENDIAN)
@@ -401,12 +408,12 @@
         framing = 20;
 
     while(*argv) {
-        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("%s: %s\n",
                 fname(*(argv++)), _TEXT("invalid"));
             continue;
         }
-        if(fsys::access(*argv, R_OK)) {
+        if(!fsys::is_readable(*argv)) {
             printf("%s: %s\n",
                 fname(*(argv++)), _TEXT("inaccessable"));
             continue;
@@ -530,12 +537,12 @@
     }
 
     while(*argv) {
-        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("audiotool: %s: %s\n",
                 fname(*(argv++)), _TEXT("invalid"));
             continue;
         }
-        if(fsys::access(*argv, R_OK)) {
+        if(!fsys::is_readable(*argv)) {
             printf("audiotool: %s: %s\n",
                 fname(*(argv++)), _TEXT("inaccessable"));
             continue;
@@ -682,12 +689,12 @@
         framing = 20;
 
     while(*argv) {
-        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("invalid"));
             continue;
         }
-        if(fsys::access(*argv, R_OK)) {
+        if(!fsys::is_readable(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("inaccessable"));
             continue;
@@ -881,12 +888,12 @@
         framing = 20;
 
     while(*argv) {
-        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("invalid"));
             continue;
         }
-        if(fsys::access(*argv, R_OK)) {
+        if(!fsys::is_readable(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("inaccessable"));
             continue;