summaryrefslogtreecommitdiff
path: root/libgphoto2
Commit message (Collapse)AuthorAgeFilesLines
* added some apparent missijng include unistd.h to make it build for ↵Marcus Meissner2023-02-141-0/+1
| | | | mingw/llvm . fixes https://github.com/gphoto/libgphoto2/issues/890
* Wrap unsafe libltdl calls with locking (#848)Marcus Meissner2022-11-052-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Wrap unsafe libltdl calls with locking https://github.com/gphoto/libgphoto2/issues/166 * 848: do not install internal header gphoto2-port-mutex.h * 848: wrap symbol declarations in #ifdef _GPHOTO2_INTERNAL_CODE * 848: Use proper include guard macro * 848: Encapsulate the lock/unlock code inside functions This hides the pthread usage as an implementation detail inside the gpi_libltdl_lock() and gpi_libltdl_unlock() functions. * 848: Rename from *-mutex.[ch] to *-locking.[ch] The *-lock.[ch] name is implementation neutral. * 848: update libgphoto2_port version number * 848: internal headers do not require __cplusplus checks * 848: add copyright comment at the beginning of *.[ch] * 848: add an unlocked variant of gp_abilities_list_load_dir to avoid lots of unlock/lock codes * 848: remove unnecessary whitespace addition Co-authored-by: kadler15 <spurfan15@gmail.com> Co-authored-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
* Complete what adding gp_init_localedir() startedHans Ulrich Niedermann2022-05-191-12/+37
| | | | | | | | | | Complete what adding the gp_init_localedir() function implied: * only set success flag in the success case * consistent use of "initialize" spelling * add analogous gp_port_init_localedir() function * implement and document edge cases * update NEWS
* Check bindtextdomain return valueJim Easterbrook2022-05-191-1/+7
|
* Change function name to gp_init_localedirJim Easterbrook2022-05-192-4/+4
|
* Add function to initialise locale directoryJim Easterbrook2022-05-192-1/+22
| | | | | | | The function is called from gp_abilities_list_new() so existing code will carry on working as before. Non-standard installations of libgphoto2 can call the initialisation function with their choice of locale dir. The function includes code to ensure it's only run once.
* fix doc copy-and-paste error for gp_message_codeset()Hans Ulrich Niedermann2022-05-151-3/+1
|
* Add TODO comment about possibly using gettext's gettext.hHans Ulrich Niedermann2021-12-091-0/+6
|
* Consistent checks for asm .symver and version-scriptHans Ulrich Niedermann2021-11-071-41/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same checks for asm .symver and -Wl,--version-script support for both libgphoto2.la and libgphoto2_port.la. This also reorganizes the Makefile.am files for libgphoto2.la and libgphoto2_port.la so that things belonging together are actually grouped together, so that inconsistencies can become more visible. This does not change what actually happens with when linking the libraries: * libgphoto2.la is still linked with just a --export-symbols libgphoto2.sym list of exported symbols. * libgphoto2_port.la is still linked with a -Wl,--version-script=libgphoto2_port.ver version script. However, the two library Makefile.am are now organized in such a way that you can actually see that. We should examine what those two symbol export methods actually do on Linux/ELF (complete support for version script semantics), and on non-ELF systems such as MacOSX dylib or Windows DLL.
* Factor out i18n stuff into separate i18n.h filesHans Ulrich Niedermann2021-10-256-70/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the i18n definitions into i18n.h include files: One include file each for libgphoto2 and for libgphoto2_port. This removes the complete #ifdef ENABLE_NLS # include <libintl.h> # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define _(String) (String) # define N_(String) (String) #endif block (which in some occasions defines even more macros) and replaces it with a single line #include "libgphoto2/i18n.h" for camlibs and libgphoto2 itself and with #include "libgphoto2_port/i18n.h" for iolibs and libgphoto2_port itself. This gives us two central locations to change the defintions.
* filesys: Add gp_filesystem_set_info_dirtyDavid Rosca2021-10-222-0/+32
| | | | Use it in ptp2 PTP_EC_ObjectInfoChanged.
* Avoid accidental include file name collisionsHans Ulrich Niedermann2021-10-116-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are five libgphoto2 internal *.h include files inside the source tree's `libgphoto2/` folder. Internal means they are part of the libgphoto2 implementation, and are not part of the public libgphoto2 API or ABI. These files have names which are so generic that it is difficult to see from a `#include` statement that the included file is actually part of libgphoto2: bayer-types.h bayer.h exif.h gamma.h jpeg.h While building, an additional file is created inside the `libgphoto2/` folder with a name which does hint to its relationship with libgphoto2: gphoto2-endian.h To reduce the probability of accidental conflicts with include files which might also be called the same very generic name, this changes the use of these include files to a preprocessor directive like #include "libgphoto2/bayer.h> instead of #include "bayer.h" To enforce the need for the "libgphoto2/" part in the #include preprocessor directive, this also removes the respective `-I` arguments for the `libgphoto2` subdir (both in source tree and in build tree) from `*_CPPFLAGS`. This change was inspired by `libgphoto2/` and `camlibs/stv0680/` containing very different include files both called `bayer.h`.
* Use a single definition of BayerTile enumHans Ulrich Niedermann2021-10-073-17/+49
| | | | | | | Use a single definition of BayerTile enum inside a new include file bayer-types.h instead of (conditionally!) duplicating the definition from libgphoto2/bayer.h to camlibs/stv680-demosaic-sharpen.h.
* Use consistently named non-reserved CPP macros for header filesHans Ulrich Niedermann2021-10-054-12/+13
| | | | | | | | | | | | | | | | | | | | | | | C preprocessor macros beginning/ending with underscores are reserved for system use as well as macros containing a double underscore anywhere, so application software macros are supposed to be named differently. For a header file gphoto2-abilities-list.h, this consistently uses a macro name LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H for the usual #ifndef LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H #define LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H ... content of the header file ... #endif /* !defined(LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H) */ Found using "clang -Weverything". This should work, unless when run with an ancient C preprocessor which might only the first 8 or 10 characters to distinguish macro names and ignores the remainder of the name.
* fix broken check of CPP macro definition after #elifHans Ulrich Niedermann2021-10-031-2/+2
| | | | | | | Fix broken check of CPP macro definition after #elif. The fact that this has not been caught yet is indicative of this configuration probably being relatively rare.
* Fixed build in mingwJaroslav Škarvada2021-08-071-1/+1
| | | | Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* Add file extension for Sony ARW filesIngvar Stepanyan2021-07-141-0/+1
|
* gp_camera_exit: Return result of camera exit function if possibleDaniel Schulte2021-03-161-2/+3
|
* Remove stdint.h shim (#625)Zeranoe2021-02-221-2/+0
| | | stdint.h has wide adoption at this point, so it should be safe to use.
* Add _DARWIN_C_SOURCE to most files that use string.h (#615)Rafał Hirsz2021-01-293-0/+3
| | | This change makes it possible to build libgphoto2 on macOS.
* mime type update for CR3Jiri Machalek2020-10-131-0/+1
|
* Fix libgphoto2 compilation warnings.Siim Meerits2020-08-032-7/+7
| | | | Resolves number of signed-unsigned comparison issues.
* Remove trailing whitespace from all *.h and *.c files.Siim Meerits2020-07-2719-287/+287
|
* Fix typos throughout the codebaseSijawusz Pur Rahnama2020-05-254-8/+8
|
* New set based camlib definition and --with-camlibs handlingHans Ulrich Niedermann2020-02-171-8/+37
| | | | | | | | | | | | | | This uses proper set operations both for GP_CAMLIB and for handling the --with-camlibs value. This allows all GP_CAMLIB definitions to be present at autoreconf time (as m4 code) time while some camlib definitions being conditional at the time of the configure run (in the sh code). The ./configure output is still a bit verbose, but we can reduce that verbosity later when we have found out that this works well on people's different systems. Fixes: https://github.com/gphoto/libgphoto2/issues/467
* added a check on the boundaries of the homo_h processing (ASAN)Marcus Meissner2020-01-251-2/+4
| | | | Otherwise we read 1 entry before the array and 1 entry after.
* free also the files in the root folder on gp_filesystem_resetMarcus Meissner2019-10-121-0/+4
| | | | fixes https://github.com/gphoto/libgphoto2/issues/425
* add some logging, avoid w and h < 2 to avoid division by 0 (AFL)Marcus Meissner2019-06-171-0/+4
|
* fixed including Win32 shlobj.h header when compiling using Visual StudioMichael Fink2019-01-121-0/+3
|
* BSD_SOURCE -> DEFAULT_SOURCEMarcus Meissner2018-06-174-4/+4
| | | | to remove warnings
* added note on ownership of the "data" pointer after gp_file_get_data_and_sizeMarcus Meissner2018-06-031-2/+6
| | | | fixes https://github.com/gphoto/libgphoto2/issues/278
* fixed autodetect returnMarcus Meissner2018-04-301-1/+1
|
* More fixes for support 64bit getpartialobject for Android in read_file_funcFlorent Viard2017-08-282-2/+4
|
* added a note that gp_file_new_from_fd takes over ownership of the file ↵Marcus Meissner2017-08-101-0/+2
| | | | | | descriptor fixes https://github.com/gphoto/libgphoto2/issues/194
* remove use of builtin exif stuff, use libexif directlyMarcus Meissner2017-04-082-790/+33
|
* harden delete_recurse against non-existing folders (AFL)Marcus Meissner2017-03-041-1/+2
|
* Adjust the semantics of gp_widget_changed to not clear the changed state.Marcus Meissner2016-11-201-7/+3
| | | | | | | Adjust the camlibs that use it (As this is mostly a internal function it should be ok to change.) Fixes https://github.com/gphoto/libgphoto2/issues/73
* store the settings on windows in CSIDL_PROFILE/.gphoto and notpeterbud2016-11-201-5/+15
| | | | in the windows directory anymore
* Use proper format string %hhX for unsigned charHans Ulrich Niedermann2016-10-291-1/+1
| | | | | | The old %hX string was for an unsigned short, but we pass an unsigned char. This silences another compiler warning.
* use 100 increments instead of 50Marcus Meissner2016-09-171-2/+2
|
* increase ability list in 50 entry blocks to make this fasterMarcus Meissner2016-09-061-3/+8
|
* adjust the value description in gp_setting_setMarcus Meissner2016-07-071-2/+2
|
* clarify wait_for_event documentation a bitMarcus Meissner2016-04-251-5/+9
|
* added GP_MIME_NEFMarcus Meissner2016-03-061-0/+1
|
* gp_file_get_name_by_type - support / in filenamesMarcus Meissner2016-03-061-8/+26
|
* emulate the single setter and list config functions viaMarcus Meissner2016-02-191-21/+231
| | | | the regular get_config and set_config if not present
* add new apisMarcus Meissner2016-02-192-0/+101
| | | | gp_camera_list_config, gp_camera_set_single_config, gp_camera_get_single_config
* remove useless time.h sys/time.h fcntl.h inclusionMarcus Meissner2016-01-041-3/+0
|
* remove probably unistd.h include , or protected by ifdef forMarcus Meissner2016-01-033-3/+0
| | | | | | building better with Visual C https://github.com/gphoto/libgphoto2/issues/33
* From: Axel Waggershauser <awagger@web.de>Marcus Meissner2015-03-271-3/+3
| | | | | | | | | | | | 3) I got heaps of error messages from a failed attempt to read the settings file. The code in gphoto_settings.c could need some proper cleanup but I only improved the logging messages a bit and made the usage of the log-level consistent (report the unproblematic failed read as a DEBUG level message consistently). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15405 67ed7778-7388-44ab-90cf-0a291f65f57c