From: Good Guy Date: Wed, 4 May 2022 19:07:18 +0000 (-0600) Subject: fixes and accomodations for other operating systems by Andrew X-Git-Tag: 2022-05~13 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=64dfa27066d9994d97a14fb2c21e60cba679dc5c;p=goodguy%2Fcinelerra.git fixes and accomodations for other operating systems by Andrew --- diff --git a/cinelerra-5.1/cinelerra/cursor.C b/cinelerra-5.1/cinelerra/cursor.C index b392dda1..87f932bb 100644 --- a/cinelerra-5.1/cinelerra/cursor.C +++ b/cinelerra-5.1/cinelerra/cursor.C @@ -51,6 +51,7 @@ return 0; int Cursor_::draw(int flash, long selectionstart, long selectionend, long zoom_sample, long viewstart, int vertical) { return 0; +#if 0 if(canvas->get_h() * canvas->get_w() == 0) return 1; if(zoom_sample == 0) return 1; // no canvas @@ -93,6 +94,7 @@ return 0; canvas->set_opaque(); } if(flash) canvas->flash(); +#endif } int Cursor_::resize(int w, int h) diff --git a/cinelerra-5.1/cinelerra/exportedl.C b/cinelerra-5.1/cinelerra/exportedl.C index cac86bcf..108c2ad6 100644 --- a/cinelerra-5.1/cinelerra/exportedl.C +++ b/cinelerra-5.1/cinelerra/exportedl.C @@ -39,7 +39,9 @@ #include "exportedl.h" #include "tracks.h" #include "transition.h" - +#if defined (__FreeBSD__) +#include +#endif #include #include diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C index 977ad1cb..885495ed 100644 --- a/cinelerra-5.1/cinelerra/indexfile.C +++ b/cinelerra-5.1/cinelerra/indexfile.C @@ -73,6 +73,9 @@ #ifdef HAVE_ISOFS #include #endif +#if defined(__FreeBSD__) +#include +#endif // check for isofs volume_id for dvd/cdrom @@ -859,7 +862,8 @@ int IndexFile::read_info(Indexable *test_indexable) data = new char[index_state->index_start]; temp = fread(data, index_state->index_start - sizeof(int64_t), 1, fd); - if(!temp) return 1; + if(!temp) { delete [] data; + return 1;} data[index_state->index_start - sizeof(int64_t)] = 0; FileXML xml; diff --git a/cinelerra-5.1/cinelerra/indexstate.C b/cinelerra-5.1/cinelerra/indexstate.C index 803c4f0b..87d907a1 100644 --- a/cinelerra-5.1/cinelerra/indexstate.C +++ b/cinelerra-5.1/cinelerra/indexstate.C @@ -304,6 +304,7 @@ int IndexState::read_markers(char *index_dir, char *file_path) if( memcmp(version, MARKER_MAGIC_VERSION, vsz) ) { eprintf(_("IndexState::read_markers marker file version mismatched\n: %s\n"), marker_path); + fclose(fp); return 1; } ret = read_marks(fp); diff --git a/cinelerra-5.1/cinelerra/resourcepixmap.C b/cinelerra-5.1/cinelerra/resourcepixmap.C index 1406dd2d..5b5a12f8 100644 --- a/cinelerra-5.1/cinelerra/resourcepixmap.C +++ b/cinelerra-5.1/cinelerra/resourcepixmap.C @@ -238,7 +238,7 @@ VFrame *ResourcePixmap::change_title_color(VFrame *title_bg, int color) c.r = color>>16; c.g = color>>8; c.b = color>>0; c.a = 0xff; if( BC_CModels::has_alpha(colormodel) && // fast path BC_CModels::calculate_pixelsize(colormodel) == sizeof(unsigned) ) { - const unsigned gap_rgba = (0xff<<24) | + const unsigned gap_rgba = ((uint32_t)(0xff)<<24) | (gap_grey<<16) | (gap_grey<<8) | (gap_grey<<0); if( th > 0 ) { unsigned *bp = (unsigned *)bar_rows[0]; diff --git a/cinelerra-5.1/guicast/bctrace.C b/cinelerra-5.1/guicast/bctrace.C index 7e453925..2d08b46b 100644 --- a/cinelerra-5.1/guicast/bctrace.C +++ b/cinelerra-5.1/guicast/bctrace.C @@ -309,7 +309,7 @@ void BC_Trace::dump_traces(FILE *fp) } } -void trace_info::set_owner() { owner = pthread_self(); } +void trace_info::set_owner() { owner = (unsigned long)pthread_self(); } void trace_info::unset_owner() { owner = 0; } void BC_Trace::dump_locks(FILE *fp) @@ -322,7 +322,7 @@ void BC_Trace::dump_locks(FILE *fp) fprintf(fp," %p %s, %s %p%s", p->info, p->title, p->loc, (void*)p->tid, p->is_owner ? " *" : ""); - if( p->info->owner && p->info->owner != p->tid ) + if( p->info->owner && p->info->owner != (unsigned long)p->tid ) fprintf(fp," %p", (void*)p->info->owner); fprintf(fp,"\n"); } diff --git a/cinelerra-5.1/guicast/filesystem.h b/cinelerra-5.1/guicast/filesystem.h index c976135b..b6cece2d 100644 --- a/cinelerra-5.1/guicast/filesystem.h +++ b/cinelerra-5.1/guicast/filesystem.h @@ -26,6 +26,11 @@ #include "bcwindowbase.inc" #include "sizes.h" +#if defined (__FreeBSD__) +#define dirent64 dirent +#define readdir64 readdir +#endif + class FileItem { public: diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C index 06fb7938..b4157811 100644 --- a/cinelerra-5.1/plugins/titler/titler.C +++ b/cinelerra-5.1/plugins/titler/titler.C @@ -57,8 +57,13 @@ #include #include #include +#if defined (__linux__) #include #include +#endif +#if defined (__FreeBSD__) +#include +#endif #include #include #include diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 0dc54fe4..504acb4a 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -47,7 +47,7 @@ pkg-built=$(BLD)/$(1).built ext=$(lastword $(subst ., ,$(1))) tarball=$(if $($(1).git),$(1).git,$(lastword $(sort $(wildcard src/$(1)*.tar.*)))) unpack=$(call unpack_$(call ext,$(1)),$(1)) -unpack_git=git clone $($(1)) $(1) +unpack_git=git clone --depth 1 $($(1)) $(1) unpack_gz=tar -xzf $(1) unpack_bz2=tar -xjf $(1) unpack_xz=tar -xJf $(1) @@ -407,6 +407,9 @@ clean: install: cp -a $(ver_mjpegtools)/mpeg2enc/mpeg2enc $(BINDIR)/. cp -a $(ver_mjpegtools)/mplex/mplex $(BINDIR)/. + +objrem: + find . -type f -name '*.o' -delete else # not WANT_CIN_3RDPARTY all: