Changeset 1549
- Timestamp:
- Apr 22, 2016, 10:40:43 PM (9 years ago)
- Location:
- fontconfig/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified fontconfig/trunk/configure.ac ¶
r1546 r1549 114 114 esac 115 115 AM_CONDITIONAL(OS_OS2, test "$os_os2" = "yes") 116 117 if test "$os_os2" = "yes"; then 118 # urpo is needed for renameForce. 119 AC_CHECK_LIB([urpo], [renameForce]) 120 fi 116 121 117 122 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) -
TabularUnified fontconfig/trunk/src/fcatomic.c ¶
r1207 r1549 58 58 #include <direct.h> 59 59 #define mkdir(path,mode) _mkdir(path) 60 #endif 61 #ifdef __OS2__ 62 #include <urpo.h> 60 63 #endif 61 64 … … 198 201 unlink ((const char *) atomic->file); 199 202 #endif 203 #if defined(__OS2__) 204 /* 205 * rename in urpo doesn't expect EACCES (which it may get due FcDirCacheLock 206 * called before initiating the cache update procedure), so force it. 207 */ 208 if (renameForce ((char *) atomic->new, (char *) atomic->file) < 0) 209 #else 200 210 if (rename ((char *) atomic->new, (char *) atomic->file) < 0) 211 #endif 201 212 return FcFalse; 202 213 return FcTrue; -
TabularUnified fontconfig/trunk/src/fccache.c ¶
r1548 r1549 38 38 #include <sys/locking.h> 39 39 #endif 40 #if defined(__OS2__) 41 #include <share.h> 42 #include <io.h> 43 #endif 40 44 41 45 #ifndef O_BINARY … … 1173 1177 if (!cache_hashed) 1174 1178 break; 1179 #if defined(__OS2__) 1180 fd = sopen ((const char *)cache_hashed, O_RDWR, SH_DENYRW); 1181 #else 1175 1182 fd = FcOpen ((const char *)cache_hashed, O_RDWR); 1183 #endif 1176 1184 FcStrFree (cache_hashed); 1177 1185 /* No caches in that directory. simply retry with another one */ 1178 1186 if (fd != -1) 1179 1187 { 1188 #if !defined(__OS2__) 1180 1189 #if defined(_WIN32) 1181 1190 if (_locking (fd, _LK_LOCK, 1) == -1) … … 1192 1201 goto bail; 1193 1202 #endif 1203 #endif 1194 1204 break; 1195 1205 } 1196 1206 } 1197 1207 return fd; 1208 #if !defined(__OS2__) 1198 1209 bail: 1199 1210 if (fd != -1) 1200 1211 close (fd); 1201 1212 return -1; 1213 #endif 1202 1214 } 1203 1215 … … 1207 1219 if (fd != -1) 1208 1220 { 1221 #if !defined(__OS2__) 1209 1222 #if defined(_WIN32) 1210 1223 _locking (fd, _LK_UNLCK, 1); … … 1218 1231 fl.l_pid = getpid (); 1219 1232 fcntl (fd, F_SETLK, &fl); 1233 #endif 1220 1234 #endif 1221 1235 close (fd);
Note:
See TracChangeset
for help on using the changeset viewer.