mirror of
https://github.com/termux/termux-packages.git
synced 2024-11-21 20:56:19 +00:00
e0313da866
Totally unusable due to incomplete porting to POSIX. Closes https://github.com/termux/termux-packages/issues/13772.
72 lines
1.7 KiB
Diff
72 lines
1.7 KiB
Diff
--- a/avs2bdnxml.c
|
|
+++ b/avs2bdnxml.c
|
|
@@ -315,7 +315,7 @@
|
|
free(h);
|
|
return 0;
|
|
#else
|
|
- fclose((FILE *)handle);
|
|
+ fclose(handle->fh);
|
|
return 0;
|
|
#endif
|
|
}
|
|
@@ -468,10 +468,29 @@
|
|
fclose(fh);
|
|
}
|
|
|
|
+#ifndef __ANDROID__
|
|
extern int asm_is_identical_sse2 (stream_info_t *s_info, char *img, char *img_old);
|
|
extern int asm_is_empty_sse2 (stream_info_t *s_info, char *img);
|
|
extern void asm_zero_transparent_sse2 (stream_info_t *s_info, char volatile *img);
|
|
extern void asm_swap_rb_sse2 (stream_info_t *s_info, char volatile *img, char volatile *out);
|
|
+#else
|
|
+static int asm_is_identical_sse2 (stream_info_t *s_info, char *img, char *img_old)
|
|
+{
|
|
+ __builtin_abort();
|
|
+}
|
|
+static int asm_is_empty_sse2 (stream_info_t *s_info, char *img)
|
|
+{
|
|
+ __builtin_abort();
|
|
+}
|
|
+static void asm_zero_transparent_sse2 (stream_info_t *s_info, char volatile *img)
|
|
+{
|
|
+ __builtin_abort();
|
|
+}
|
|
+static void asm_swap_rb_sse2 (stream_info_t *s_info, char volatile *img, char volatile *out)
|
|
+{
|
|
+ __builtin_abort();
|
|
+}
|
|
+#endif
|
|
|
|
int is_identical_c (stream_info_t *s_info, char *img, char *img_old)
|
|
{
|
|
@@ -535,6 +554,7 @@
|
|
|
|
int detect_sse2 ()
|
|
{
|
|
+#ifndef __ANDROID__
|
|
static int detection = -1;
|
|
unsigned int func = 0x00000001;
|
|
unsigned int eax, ebx, ecx, edx;
|
|
@@ -560,6 +580,9 @@
|
|
fprintf(stderr, "CPU: Using pure C functions.\n");
|
|
|
|
return detection;
|
|
+#else /* __ANDROID__ */
|
|
+ return 0;
|
|
+#endif
|
|
}
|
|
|
|
int is_identical (stream_info_t *s_info, char *img, char *img_old)
|
|
@@ -664,7 +687,11 @@
|
|
);
|
|
}
|
|
|
|
+#ifndef __ANDROID__
|
|
extern char *rindex(const char *s, int c);
|
|
+#else
|
|
+#define rindex strrchr
|
|
+#endif
|
|
int is_extension(char *filename, char *check_ext)
|
|
{
|
|
char *ext = rindex(filename, '.');
|