Commit Graph

48 Commits

Author SHA1 Message Date
Rémi Denis-Courmont cc129a71d7 Remove old mail address from sources 2019-09-04 22:11:04 +03:00
Steve Lhomme 333ed248b9 use the proper check for sys/socket.h availability 2018-04-12 13:19:23 +02:00
Rémi Denis-Courmont a0fbc944ce posix: fix O_CLOEXEC flag in open/openat 2018-03-10 21:55:31 +02:00
Rémi Denis-Courmont d3f1e231a0 posix: remove non-standard flag 2018-02-12 23:57:04 +02:00
Rémi Denis-Courmont 055268706e posix: drop lstat() test
POSIX has required this since forever. Non-POSIX OS have their own
back-end already. (Incidentally, vlc_stat() is dead code.)
2018-02-12 19:41:14 +02:00
Rémi Denis-Courmont 037cd82856 linux: split out Linux-specific stuff from filesystem.c 2018-02-12 19:31:50 +02:00
Rémi Denis-Courmont 3023db527d linux: add support for memfd_create() 2018-02-09 22:16:35 +02:00
Rémi Denis-Courmont 18e0428b17 tls: reorganize and update documentation 2017-02-26 12:41:07 +02:00
Rémi Denis-Courmont 7dba562c26 posix: assert that we do not close a corrupt FD
This helps detect double-close or other bugs.
2017-02-23 21:08:06 +02:00
Rémi Denis-Courmont f8abd3334f posix: fix BSD build 2016-06-07 21:11:38 +03:00
Rémi Denis-Courmont 4171533429 posix: use posix_close() where available 2016-04-22 00:17:45 +03:00
Rémi Denis-Courmont 582355f965 src: add vlc_close() wrapper 2016-04-22 00:11:34 +03:00
Jean-Baptiste Kempf b051a4b580 posix fs: define vlc_cloexec when mkostemp does not exist
On Android, for 64 bits, O_CLOEXEC is defined, accept4 exists, but not
mkostemp.

Therefore, in vlc_mkstemp we go to the fallback that calls vlc_cloexec,
but we don't define it, because we have accept4

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-03-05 22:40:57 +01:00
Rémi Denis-Courmont 80a7275909 posix: "fix" close-on-exec mode setting
Coverity and POSIX want you to get-and-set the file descriptor flags
(even though they are always zero by default).

Also drop fallback for Linux 2.6.26 and older.
2016-01-17 17:44:08 +02:00
Rémi Denis-Courmont 9d02c991ab src: add vlc_socketpair() helper
(works like vlc_socket())
2016-01-10 20:48:01 +02:00
Jean-Baptiste Kempf 9c9e634693 Remove tabs in source code 2015-11-05 10:00:01 +01:00
Rémi Denis-Courmont 34d4f3135b filesystem: use native mkstemp() on POSIX 2015-08-24 20:48:17 +03:00
Rémi Denis-Courmont ab29a4598b filesystem: add vlc_memfd() helper 2015-08-24 20:48:17 +03:00
Rémi Denis-Courmont cc8bb2ed40 Remove useless #include 2015-08-24 20:48:17 +03:00
Rémi Denis-Courmont 68e1c0ad66 filesystem: deal with Linux O_TMPFILE open() flag correctly 2015-08-24 20:48:17 +03:00
Rémi Denis-Courmont 4a9766d288 filesystem: constify vlc_readdir() 2015-08-24 20:48:16 +03:00
Rémi Denis-Courmont 3244a74480 filesystem: clean up documentation 2015-08-24 20:48:16 +03:00
Rafaël Carré 91f08755de Missing header 2015-06-04 10:13:12 +02:00
Rémi Denis-Courmont d89c419507 src: add vlc_write() and vlc_writev() helpers against SIGPIPE
We would rather not terminate the whole VLC process in case of a
broken pipe or remotely closed TCP connection.
2015-06-03 20:21:15 +03:00
Rémi Denis-Courmont cb186021f6 posix: add support for BSD SO_NOSIGPIPE socket option 2015-05-21 20:32:03 +03:00
Rémi Denis-Courmont bc43f3ac8c posix: revector vlc_accept() 2015-05-21 20:31:53 +03:00
Rémi Denis-Courmont 74c4dd3966 posix: use getcwd() directly, ignore $PWD and avoid ToCToU 2014-09-14 17:47:32 +03:00
Rémi Denis-Courmont 25d5ddb505 Add missing argument to fcntl(F_DUPFD_CLOEXEC) 2014-04-12 11:35:58 +03:00
Rémi Denis-Courmont ee0b9164f9 vlc_readdir: remove string duplication, simplify 2014-01-27 18:56:15 +02:00
Rémi Denis-Courmont 7625fc4bd4 vlc_readdir: drop support for threaded access to a single DIR
This simplifies the code and avoids the controversial readdir_r()
function. None of the vlc_readdir() or vlc_loaddir() code paths shared
the directory handle with another thread anyway.
2014-01-27 18:28:23 +02:00
Rémi Denis-Courmont 779fd3dd59 Fix grammar / typo 2014-01-10 19:13:24 +02:00
Rémi Denis-Courmont 3dfba47808 vlc_readdir: fix integer overflow on error 2014-01-09 21:04:36 +02:00
Maxim Bublis 4b726052a3 Fixed unused variable and parameter warnings.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2013-12-01 19:19:14 +01:00
Rémi Denis-Courmont eeaa3b9ef3 Remove unprotected ARM-specific syscall 2012-09-11 00:47:30 +03:00
Rémi Denis-Courmont 2f2d6f4dd7 Remove unneeded OS/2 hacks
They are in src/os2/filesystem.c.
2012-05-16 17:19:50 +03:00
Rémi Denis-Courmont 04b1b0a687 vlc_opendir: simplify and partly revert previous commit
opendir() sets close-on-exec anyway.
2012-03-19 23:35:13 +02:00
Rémi Denis-Courmont bc032f3ca6 posix: drop support for non-UTF-8 operating systems
This patch also removes support for legacy encodings:
 - in taglib, in the non-Windows code paths,
 - in the Internationalized Domain Names resolved (only glibc) and
 - in the GNOME VFS module.

Support for translation from/to UTF-8 was disabled by default 20 months
ago, and scheduled for removal, 14 months ago.
2012-03-19 22:12:44 +02:00
Rémi Denis-Courmont 7f3120af8f posix: open directories with close-on-exec flag 2012-03-19 22:12:43 +02:00
Rémi Denis-Courmont d3e59dc6d4 Fix warning if openat() is not supported 2012-03-16 11:35:26 +02:00
Rémi Denis-Courmont 032a234740 Include system headers before VLC headers
This fixes some problems when the system or VLC play evil tricks with
the preprocessor. (Only files including sys/stat.h are concerned with
this commit. I did not fix all files.)
2012-01-27 23:31:48 +02:00
Jean-Baptiste Kempf 36ab287e77 LGPL
Re-license almost all of libVLC and libVLCcore to LGPLv2.1+

This move was authorized by the developers, either:
 - by e-mail,
 - by vote at the VideoLAN Dev Days 2011,
 - on the license website,
 - in a contract, oral or written.
No objection was raised, so far.

The developers agreeing are:
  Justus Piater
  Alexis Ballier
  Alexander Bethke
  Mohammed Adnène Trojette
  Alex Converse
  Alexey Sokolov
  Alexis de Lattre
  Andre Pang
  Anthony Loiseau
  Cyril Deguet
  André Weber
  Boris Dorès
  Brieuc Jeunhomme
  Benjamin Drung
  Hugo Beauzée-Luyssen
  Benoit Steiner
  Benjamin Pracht
  Bernie Purcell
  Przemyslaw Fiala
  Arnaud de Bossoreille de Ribou
  Brad Smith
  Nick Briggs
  Christopher Rath
  Christophe Courtaut
  Christopher Mueller
  Clement Chesnin
  Andres Krapf
  Damien Fouilleul
  David Flynn
  Sebastien Zwickert
  Antoine Cellerier
  Jérôme Decoodt
  Jérome Decoodt
  Dylan Yudaken
  Eduard Babayan
  Eugenio Jarosiewicz
  Elliot Murphy
  Eric Petit
  Erwan Tulou
  Etienne Membrives
  Ludovic Fauvet
  Fabio Ritrovato
  Tobias Güntner
  Jakub Wieczorek
  Frédéric Crozat
  Francois Cartegnie
  Laurent Aimar
  Florian G. Pflug
  Felix Paul Kühne
  Frank Enderle
  Rafaël Carré
  Simon Latapie
  Gildas Bazin
  Geoffroy Couprie
  Julien / Gellule
  Gildas Bazin
  Arnaud Schauly
  Toralf Niebuhr
  Vicente Jimenez Aguilar
  Derk-Jan Hartman
  Henri Fallon
  Ilkka Ollakka
  Olivier Teulière
  Rémi Duraffort
  Jakob Leben
  Jean-Baptiste Kempf
  Jean-Paul Saman
  Jean-Philippe Grimaldi
  Jean-François Massol
  Gaël Hendryckx
  Jakob Leben
  Jean-Marc Dressler
  Jai Menon
  Johan Bilien
  Johann Ransay
  Joris van Rooij
  JP Dinger
  Jean-Philippe André
  Adrien Grand
  Juha Jeronen
  Juho Vähä-Herttua
  Kaarlo Raiha
  Kaarlo Raiha
  Kamil Baldyga
  Keary Griffin
  Ken Self
  KO Myung-Hun
  Pierre Ynard
  Filippo Carone
  Loïc Minier
  Luca Barbato
  Lucas C. Villa Real
  Lukas Durfina
  Adrien Maglo
  Marc Ariberti
  Mark Lee
  Mark Moriarty
  Martin Storsjö
  Christophe Massiot
  Michel Kaempf
  Marian Ďurkovič
  Mirsal Ennaime
  Carlo Calabrò
  Damien Lucas
  Naohiro Koriyama
  Basos G
  Pierre Baillet
  Vincent Penquerc'h
  Olivier Aubert
  Pankaj Yadav
  Paul Corke
  Pierre d'Herbemont
  Philippe Morin
  Antoine Lejeune
  Michael Ploujnikov
  Jean-Marc Dressler
  Michael Hanselmann
  Rafaël Carré
  Ramiro Polla
  Rémi Denis-Courmont
  Renaud Dartus
  Richard Shepherd
  Faustino Osuna
  Arnaud Vallat
  Rob Jonson
  Robert Jedrzejczyk
  Steve Lhomme
  Rocky Bernstein
  Romain Goyet
  Rov Juvano
  Sam Hocevar
  Martin T. H. Sandsmark
  Sebastian Birk
  Sébastien Escudier
  Vincent Seguin
  Fabio Ritrovato
  Sigmund Augdal Helberg
  Casian Andrei
  Srikanth Raju
  Hannes Domani
  Stéphane Borel
  Stephan Krempel
  Stephan Assmus
  Tony Castley
  Pavlov Konstantin
  Eric Petit
  Tanguy Krotoff
  Dennis van Amerongen
  Michel Lespinasse
  Can Wu
  Xavier Marchesini
  Sébastien Toque
  Christophe Mutricy
  Yoann Peronneau
  Yohann Martineau
  Yuval Tze
  Scott Caudle
  Clément Stenac

It is possible, that some minor piece of code was badly tracked, for
some reasons (SVN, mainly) or that some small developers did not answer.
However, as an "œuvre collective", defined as in "CPI 113-2 alinéa 3",
and seeing "Cour. Cass. 17 Mai 1978", and seeing that the editor and
the very vast majority of developers have agreed (> 99.99% of the code,
> 99% of developers), we are fine here.
2011-11-27 22:54:33 +01:00
KO Myung-Hun 9ab620e712 Fix vlc_readdir() for OS/2
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2011-10-14 17:59:03 +03:00
Rémi Denis-Courmont f321630f36 Fix vlc_readdir() on non-UTF-8 POSIX systems for now 2011-10-11 20:23:40 +03:00
Rémi Denis-Courmont be14e27798 "Improve" readdir_r() usage 2011-10-10 22:18:41 +03:00
Rafaël Carré ce3960e889 android: Implement pipe2 2011-09-06 00:00:54 +02:00
Rémi Denis-Courmont 5110789433 vlc_getcwd: return current directory as UTF-8 2011-07-11 18:47:43 +03:00
Rémi Denis-Courmont a1e644f767 Use POSIX fcntl(F_DUPFD_CLOEXEC) instead of Linux dup3()
As an added bonus, we don't need to open /dev/null for nothing.
2011-03-19 00:13:47 +02:00
Rémi Denis-Courmont 65242d776a Move core POSIX files to their own directory like Windows files 2011-02-17 19:48:22 +02:00