summaryrefslogtreecommitdiff
path: root/lang/rexx-regina/files/patch-files.c
blob: 27112990f3b7bad5787bdb4a20d4a295c5717472 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
--- files.c.orig	2019-10-06 06:09:39 UTC
+++ files.c
@@ -76,6 +76,8 @@
  * flag, which all other routines will check for.
  */
 
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+
 /*
  * Bug in LCC complier wchar.h that incorrectly says it defines stat struct
  * but doesn't
@@ -4139,14 +4141,14 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
 #else
          if ( sizeof(rx_64) > 4 )
             sprintf( result->value,
-               "%ld %ld %03o %d %s %s %lld",
+               "%ld %ld %03o %lu %s %s %ld",
                (long)(buffer.st_dev), (long)(buffer.st_ino),
                buffer.st_mode & ACCESSPERMS, buffer.st_nlink,
                ptmppwd, ptmpgrp,
                (rx_64)(buffer.st_size) ) ;
          else
             sprintf( result->value,
-               "%ld %ld %03o %d %s %s %ld",
+               "%ld %ld %03o %lu %s %s %ld",
                (long)(buffer.st_dev), (long)(buffer.st_ino),
                buffer.st_mode & ACCESSPERMS, buffer.st_nlink,
                ptmppwd, ptmpgrp,
@@ -4181,7 +4183,7 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", buffer.st_size ) ;
 #else
             if ( sizeof(rx_64) > 4 )
-               sprintf( result->value, "%lld", (rx_64)(buffer.st_size) ) ;
+               sprintf( result->value, "%ld", (rx_64)(buffer.st_size) ) ;
             else
                sprintf( result->value, "%ld", (long)(buffer.st_size) ) ;
 #endif
@@ -4259,9 +4261,9 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", buffer.st_ctime );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", buffer.st_ctime );
+               sprintf( result->value, "%lld", (long long) buffer.st_ctime );
             else
-               sprintf( result->value, "%ld", buffer.st_ctime);
+               sprintf( result->value, "%ld", (long) buffer.st_ctime);
 #endif
          }
          break;
@@ -4277,9 +4279,9 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", buffer.st_mtime );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", buffer.st_mtime );
+               sprintf( result->value, "%lld", (long long) buffer.st_mtime );
             else
-               sprintf( result->value, "%ld", buffer.st_mtime);
+               sprintf( result->value, "%ld", (long) buffer.st_mtime);
 #endif
          }
          break;
@@ -4295,9 +4297,9 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", buffer.st_atime );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", buffer.st_atime );
+               sprintf( result->value, "%lld", (long long) buffer.st_atime );
             else
-               sprintf( result->value, "%ld", buffer.st_atime);
+               sprintf( result->value, "%ld", (long) buffer.st_atime);
 #endif
          }
          break;
@@ -4310,7 +4312,7 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", pos_read + 1 );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", pos_read + 1 );
+               sprintf( result->value, "%ld", pos_read + 1 );
             else
                sprintf( result->value, "%ld", (long)(pos_read + 1) );
 #endif
@@ -4326,7 +4328,7 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", pos_write + 1 );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", pos_write + 1 );
+               sprintf( result->value, "%ld", pos_write + 1 );
             else
                sprintf( result->value, "%ld", (long)(pos_write + 1) );
 #endif
@@ -4342,7 +4344,7 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", line_read );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", line_read );
+               sprintf( result->value, "%ld", line_read );
             else
                sprintf( result->value, "%ld", (long)line_read );
 #endif
@@ -4388,7 +4390,7 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", line_write + 1 );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", line_write + 1 ) ;
+               sprintf( result->value, "%ld", line_write + 1 ) ;
             else
                sprintf( result->value, "%ld", (long)(line_write + 1) ) ;
 #endif
@@ -4401,7 +4403,7 @@ static streng *getstatus( tsd_t *TSD, const streng *fi
             sprintf( result->value, "%I64u", line_write );
 #else
             if ( sizeof(off_t) > 4 )
-               sprintf( result->value, "%lld", line_write ) ;
+               sprintf( result->value, "%ld", line_write ) ;
             else
                sprintf( result->value, "%ld", (long)line_write ) ;
 #endif
@@ -4463,7 +4465,7 @@ static streng *getrexxstatus( const tsd_t *TSD, cfileb
 #else
    if ( sizeof(rx_64) > 4 )
       sprintf( result->value + strlen(result->value),
-            " READ: char=%lld line=%lld WRITE: char=%lld line=%lld %s",
+            " READ: char=%ld line=%ld WRITE: char=%ld line=%ld %s",
             (ptr->readpos+1), ptr->readline,
             (ptr->writepos+1), ptr->writeline,
             (ptr->flag & FLAG_PERSIST) ? "PERSISTENT" : "TRANSIENT" ) ;
@@ -4851,7 +4853,7 @@ static streng *getseek( tsd_t *TSD, const streng *file
       sprintf(result->value, "%I64u", pos );
 #else
       if ( sizeof(rx_64) > 4 )
-         sprintf(result->value, "%lld", pos );
+         sprintf(result->value, "%ld", pos );
       else
          sprintf(result->value, "%ld", (long)pos );
 #endif
@@ -6079,7 +6081,7 @@ static streng *get_external_routine_file( const tsd_t 
    if ( *fp == NULL )
       return NULL;
 
-   my_fullpath( TSD, buf, inname );
+   my_fullpath( (tsd_t *) TSD, buf, inname );
 
    return Str_crestrTSD( buf );
 }
@@ -6717,7 +6719,7 @@ int my_fullpathstreng( const tsd_t *TSD, char *dst, co
    int retval;
 
    copy = str_ofTSD( src );
-   retval = my_fullpath( TSD, dst, copy );
+   retval = my_fullpath( (tsd_t *) TSD, dst, copy );
    FreeTSD( copy );
 
    return retval;