additional Andrew provided Termux mods +
authorGood Guy <good1.2guy@gmail.com>
Mon, 15 Nov 2021 21:24:42 +0000 (14:24 -0700)
committerGood Guy <good1.2guy@gmail.com>
Mon, 15 Nov 2021 21:24:42 +0000 (14:24 -0700)
cinelerra-5.1/guicast/Makefile
cinelerra-5.1/guicast/bthread.h [new file with mode: 0644]
cinelerra-5.1/guicast/filesystem.C
cinelerra-5.1/guicast/thread.C
cinelerra-5.1/guicast/thread.h
cinelerra-5.1/guicast/vframe.C
cinelerra-5.1/guicast/vframe.h

index cf189dea6d25e5d9c481b3628a30e7657cc9c57c..88369959941d54bbdbcc3d7dc14e2076a555eba4 100644 (file)
@@ -12,6 +12,14 @@ ifeq ($(OBJDIR), amd64)
 BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\""
 endif
 
 BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\""
 endif
 
+ifeq ($(OBJDIR), armv8l)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf32-littlearm\""
+endif
+
+ifeq ($(OBJDIR), aarch64)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf64-littlearm\""
+endif
+
 $(shell mkdir -p $(OBJDIR) )
 
 OBJS = \
 $(shell mkdir -p $(OBJDIR) )
 
 OBJS = \
diff --git a/cinelerra-5.1/guicast/bthread.h b/cinelerra-5.1/guicast/bthread.h
new file mode 100644 (file)
index 0000000..57a0c49
--- /dev/null
@@ -0,0 +1,31 @@
+/* BThread main header
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+# define PTHREAD_CANCEL_ENABLE          0x00000010
+# define PTHREAD_CANCEL_DISABLE         0x00000000
+
+# define PTHREAD_CANCEL_ASYNCHRONOUS 0x00000020
+# define PTHREAD_CANCEL_DEFERRED     0x00000000
+
+#define PTHREAD_CANCELED ((void *) -1)
+
+int pthread_setcancelstate (int , int *);
+int pthread_setcanceltype (int , int *);
+void pthread_testcancel (void);
+int pthread_cancel (pthread_t t);
index 6017f6eaf7deeff4c9aa4d30a6ffa006398dd8f0..b1ace6fd7478d4eeda1fd2a83579ee5e43d430e6 100644 (file)
@@ -536,7 +536,7 @@ int FileSystem::parse_tildas(char *new_dir)
                                new_user[j] = new_dir[i];
                        }
                        new_user[j] = 0;
                                new_user[j] = new_dir[i];
                        }
                        new_user[j] = 0;
-
+#if !defined(__TERMUX__)
                        setpwent();
                        while( (pw = getpwent()) != 0 )
                        {
                        setpwent();
                        while( (pw = getpwent()) != 0 )
                        {
@@ -550,6 +550,7 @@ int FileSystem::parse_tildas(char *new_dir)
                        }
                        }
                        endpwent();
                        }
                        }
                        endpwent();
+#endif
                        return 0;
                }
        }
                        return 0;
                }
        }
index 50b52a47cc52069f5becc3c37d189757884aaee1..9908a6280d54e04706949a47f78ac85ee324dae2 100644 (file)
@@ -28,6 +28,9 @@
 #include <string.h>
 #include <typeinfo>
 #include "thread.h"
 #include <string.h>
 #include <typeinfo>
 #include "thread.h"
+#if defined(__TERMUX__)
+#include "bthread.h"
+#endif
 
 
 Thread::Thread(int synchronous, int realtime, int autodelete)
 
 
 Thread::Thread(int synchronous, int realtime, int autodelete)
@@ -102,8 +105,10 @@ void Thread::start()
                        perror("Thread::start pthread_attr_setschedparam");
        }
        else {
                        perror("Thread::start pthread_attr_setschedparam");
        }
        else {
+#if !defined(__TERMUX__)
                if(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) < 0)
                        perror("Thread::start pthread_attr_setinheritsched");
                if(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) < 0)
                        perror("Thread::start pthread_attr_setinheritsched");
+#endif
        }
 
 // autodelete may delete this immediately after create
        }
 
 // autodelete may delete this immediately after create
index 79f3e713c34bf99d293e96a12f1ae3f32113a78b..0d71afb4cad59f1e400ead1ec8eed21781ce890b 100644 (file)
@@ -26,6 +26,8 @@
 #include <pthread.h>
 #include <unistd.h>
 
 #include <pthread.h>
 #include <unistd.h>
 
+#if !defined(__TERMUX__)
+
 #ifndef NO_TID
 #include <sys/syscall.h>
 
 #ifndef NO_TID
 #include <sys/syscall.h>
 
@@ -37,6 +39,8 @@ static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
 static inline long gettid() { return (long)pthread_self(); }
 #endif
 
 static inline long gettid() { return (long)pthread_self(); }
 #endif
 
+#endif
+
 // The thread does not autodelete by default.
 // If autodelete is 1 the thread autodeletes.
 // If it's synchronous the deletion occurs in join().
 // The thread does not autodelete by default.
 // If autodelete is 1 the thread autodeletes.
 // If it's synchronous the deletion occurs in join().
index af0e52a85d1e186fba228ce8bd88777ba2e7855f..44d7f97e6284a3f5f2c333902cc3dfceef930afe 100644 (file)
@@ -334,7 +334,7 @@ if( memory_type != VFrame::SHARED )
                        shmid = -1;
                        break;
 
                        shmid = -1;
                        break;
 
-               case VFrame::SHMGET:
+               case VFrame::SHM_GET:
                        if(data)
                                shmdt(data);
                        data = 0;
                        if(data)
                                shmdt(data);
                        data = 0;
@@ -510,7 +510,7 @@ int VFrame::allocate_data(unsigned char *data, int shmid,
                this->v_offset = v_offset;
        }
        else if( shmid >= 0 ) {
                this->v_offset = v_offset;
        }
        else if( shmid >= 0 ) {
-               memory_type = VFrame::SHMGET;
+               memory_type = VFrame::SHM_GET;
                this->data = (unsigned char*)shmat(shmid, NULL, 0);
                if( this->data == (unsigned char*)-1 ) {
                        printf("VFrame::allocate_data %d could not attach"
                this->data = (unsigned char*)shmat(shmid, NULL, 0);
                if( this->data == (unsigned char*)-1 ) {
                        printf("VFrame::allocate_data %d could not attach"
@@ -593,7 +593,7 @@ void VFrame::set_memory(unsigned char *data,
        else
        if(shmid >= 0)
        {
        else
        if(shmid >= 0)
        {
-               memory_type = VFrame::SHMGET;
+               memory_type = VFrame::SHM_GET;
                this->data = (unsigned char*)shmat(shmid, NULL, 0);
                this->shmid = shmid;
        }
                this->data = (unsigned char*)shmat(shmid, NULL, 0);
                this->shmid = shmid;
        }
@@ -635,7 +635,7 @@ void VFrame::set_compressed_memory(unsigned char *data,
        else
        if(shmid >= 0)
        {
        else
        if(shmid >= 0)
        {
-               memory_type = VFrame::SHMGET;
+               memory_type = VFrame::SHM_GET;
                this->data = (unsigned char*)shmat(shmid, NULL, 0);
                this->shmid = shmid;
        }
                this->data = (unsigned char*)shmat(shmid, NULL, 0);
                this->shmid = shmid;
        }
@@ -713,7 +713,7 @@ UNBUFFER(data);
                        else
                                free(data);
                }
                        else
                                free(data);
                }
-               else if( memory_type == VFrame::SHMGET ) {
+               else if( memory_type == VFrame::SHM_GET ) {
                        if( data ) shmdt(data);
                }
 
                        if( data ) shmdt(data);
                }
 
index 589fce1c638aad07c22b15a40ac82182d1748d0a..dc907821efca0fb90f721cb444b6c9127bc21994 100644 (file)
@@ -417,7 +417,7 @@ private:
        {
                PRIVATE,
                SHARED,
        {
                PRIVATE,
                SHARED,
-               SHMGET
+               SHM_GET
        };
 
 // Data pointer is pointing to someone else's buffer.
        };
 
 // Data pointer is pointing to someone else's buffer.