summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-util.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: Make some unused-variable warnings go awayMaarten Bosmans2011-06-241-8/+13
|
* rtkit: use private bus connection in order to avoid threading issues when ↵Lennart Poettering2011-05-061-1/+2
| | | | invoking pa_make_realtime()
* alsa-mixer: Get rid of a compiler warning.Tanu Kaskinen2011-03-281-8/+23
| | | | | | | | | | On 64-bit systems LONG_MAX is greater than the largest possible value of a uint32_t variable, which caused the compiler to warn about a comparison that is always false. On 32-bit systems pa_atou() can return a value that will overflow when assigned to e->volume_limit, which has type long, so the comparison was necessary. This dilemma is resolved by using pa_atol() instead of pa_atou().
* Move compile-time checks around pa_run_from_build_tree to core-utilMaarten Bosmans2011-03-241-3/+0
| | | | To make the code cleaner and have the checks all in one place.
* Merge remote-tracking branch 'zonique/osx'Colin Guthrie2011-03-241-1/+37
|\
| * osx: add routines for real-time thread schedulingDaniel Mack2011-03-211-1/+37
| | | | | | | | | | Code sniplets are based on examples provided by Apple. See http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KernelProgramming/scheduler/scheduler.html
* | Get rid of some warnings: -Wunsafe-loop-optimizationsMaarten Bosmans2011-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | pulsecore/core-util.c: In function ‘pa_hexstr’: pulsecore/core-util.c:1858: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] modules/alsa/alsa-mixer.c: In function ‘pa_alsa_decibel_fix_dump’: modules/alsa/alsa-mixer.c:3678: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations] modules/alsa/alsa-mixer.c: In function ‘pa_alsa_path_set_new’: modules/alsa/alsa-mixer.c:2640: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
* | Get rid of some warnings: -Wunused-resultMaarten Bosmans2011-03-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modules/module-default-device-restore.c: In function ‘load’: modules/module-default-device-restore.c:67: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] modules/module-default-device-restore.c:88: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] pulsecore/authkey.c: In function ‘generate’: pulsecore/authkey.c:58: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result] pulsecore/core-util.c: In function ‘pa_make_secure_dir’: pulsecore/core-util.c:261: warning: ignoring return value of ‘fchown’, declared with attribute warn_unused_result [-Wunused-result]
* | Merge remote-tracking branch 'mkbosmans/mingw32-build'Colin Guthrie2011-03-201-78/+45
|\ \ | |/ |/|
| * Find modules and config files relative to the installed libraries.Maarten Bosmans2011-03-191-78/+45
| | | | | | | | Do not use replace %PULSE_ROOT% from the environment.
* | Fix up some double spacesMaarten Bosmans2011-03-181-5/+5
| |
* | Fix up according to Coding StyleMaarten Bosmans2011-03-111-8/+5
| | | | | | | | Only whitespace changes in here
* | Get rid of some unused-function compiler warningsMaarten Bosmans2011-03-021-0/+4
|/
* win32: Implement rtclock based on QueryPerformanceCounterMaarten Bosmans2011-02-171-2/+0
| | | | Also remove some unnecessary <time.h> headers.
* Implement some functions for win32Maarten Bosmans2011-02-171-9/+53
| | | | And disable building binaries for win32 that make no sense there
* Repair some typosMaarten Bosmans2011-02-171-4/+4
|
* Fix dependencies and include necessary headersMaarten Bosmans2011-02-171-0/+1
|
* Use PCRE if POSIX regex.h is not availableMaarten Bosmans2011-02-171-1/+6
|
* Apply #ifdefs around functionality not available on win32Maarten Bosmans2011-02-171-2/+39
| | | | And also the reverse: around some win32 specific functionality
* Use <pulsecore/socket.h> instead of <sys/socket.h>Maarten Bosmans2011-02-171-2/+1
| | | | | | | | The check whether POSIX socket.h or WIN32 winsock2.h must be included can be made centrally. The downside is that some functionality of e.g. arpa/inet.h is also implemented in winsock.h, so that some files that don't use socket functions, but do use inet.h functions, must also include pulsecore/socket.h. (as well as arpa/inet.h)
* Use setenv instead of putenvMaarten Bosmans2011-02-171-1/+1
| | | | | | | In theory putenv could be used to handle freeing of strings yourself, but this was not done in PulseAudio. That leaves no advantages in using putenv. With setenv you're at the mercy of the implementation whether the strings leak, but at least that is better then a certain leak, as it was before.
* Core: Fix incorrect check of return valueScott Reeves2011-01-231-2/+2
|
* core-util: ensure that we chmod only the dir we ourselves createdKees Cook2010-05-081-5/+34
|
* core-util: introduce generic function pa_strip()Lennart Poettering2010-02-211-4/+24
|
* fix a number of warningsDaniel Mack2010-01-051-2/+2
| | | | | most of them were due to missing #ifdefs or wrong printf format type for [s]size_t.
* core: make cpuid code compile cleanly with 32bit PICLennart Poettering2009-11-111-2/+6
|
* core-util: add call to detect if we are called from within a VMLennart Poettering2009-11-051-0/+89
|
* daemon: make sure pa has its own session and process group, but is not its ↵Lennart Poettering2009-10-311-0/+16
| | | | leader so that we cannot acquire a tty ever
* use pa_fopen_cloexec() where applicableLennart Poettering2009-10-301-4/+4
|
* core-util: introduce pa_fopen_cloexec()Lennart Poettering2009-10-301-2/+27
|
* core-util: make sure to enable FD_CLOEXEC unconditionally to cope with ↵Lennart Poettering2009-10-301-3/+12
| | | | kernels that silently accept but ignore O_CLOEXEC
* use cloexec wrappers wherever applicableLennart Poettering2009-10-301-4/+1
|
* core-util: introduce FD_CLOEXEC wrappers for open/socket/pipe/acceptLennart Poettering2009-10-301-0/+79
|
* Merge branch 'master' into dbus-workTanu Kaskinen2009-10-021-19/+71
|\ | | | | | | | | Conflicts: src/daemon/daemon-conf.c
| * core-util: unify how we determine the temporary directoryLennart Poettering2009-09-171-10/+23
| |
| * Improve TMPDIR handlingLennart Poettering2009-09-171-1/+1
| | | | | | | | | | | | Patch from 'jnelson', http://pulseaudio.org/ticket/653
| * core-util: properly fill in exception array for pa_reset_sigs() ↵Lennart Poettering2009-09-081-1/+1
| | | | | | | | (llvm-clang-analyzer)
| * llvm-clang-analyzer: drop a few unnecessary assignments and other trivial fixesLennart Poettering2009-09-081-8/+5
| |
| * Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudioLennart Poettering2009-09-021-0/+10
| |\
| | * core-util: call dbus_connection_set_exit_on_disconnect() on shared busses to ↵Lennart Poettering2009-09-021-0/+10
| | | | | | | | | | | | make sure dbus_shutdown() isn't fatal
| * | core-util: don't leak memory in pa_unset_env_recorded()Lennart Poettering2009-09-021-2/+4
| |/
| * core-util: add api for setting env vars and record them so that we can undo ↵Lennart Poettering2009-09-021-0/+30
| | | | | | | | them n fork
* | Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-workTanu Kaskinen2009-08-301-6/+6
|\| | | | | | | | | Conflicts: src/modules/module-stream-restore.c
| * core-util: Fix logic of pa_make_path_absolute()Andy Shevchenko2009-08-281-6/+6
| | | | | | | | | | Make it works as described in commentary (when fn is NULL, pa_assert(fn) could break logic).
* | Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-workTanu Kaskinen2009-08-241-95/+42
|\| | | | | | | | | Conflicts: src/Makefile.am
| * port a few things over to use xmalloc and friends instead of low-level libc ↵Lennart Poettering2009-08-231-1/+1
| | | | | | | | malloc/free directly
| * core: Add thread-safe group info functions with dynamic buffersTed Percival2009-08-221-86/+20
| | | | | | | | | | | | | | Provides getgrgid, getgrnam, getpwuid & getpwnam replacements that are thread safe (a la getgrgid_r() and friends) that internally handle allocating big-enough buffers to avoid ERANGE errors on large users or groups.
| * adjust various data/library paths automatically if we are run from a build treeLennart Poettering2009-08-211-0/+19
| |
| * core: check return value of getgrnam_r() instead of errnoLennart Poettering2009-08-201-40/+34
| | | | | | | | | | | | | | According to POSIX getgrnam_r() returns the error code as return value, and not in errno. Honour that. Pointed out and inspired by a patch from Ted Percival.
* | Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-workTanu Kaskinen2009-08-161-15/+104
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/Makefile.am src/daemon/daemon-conf.c src/daemon/daemon.conf.in src/modules/module-stream-restore.c src/pulse/client-conf.c src/pulsecore/namereg.c