Commit Graph

48 Commits

Author SHA1 Message Date
Alexandre Janniaux 4b51462fe3 vlc_fs: fix doxygen warnings
include/vlc_fs.h:201: warning: The following parameter of vlc_lstat(const char *filename, struct stat *buf) is not documented:
      parameter 'buf'

    include/vlc_fs.h:193: warning: The following parameter of vlc_stat(const char *filename, struct stat *buf) is not documented:
      parameter 'buf'

    include/vlc_fs.h:92: warning: argument 'dir' of command @param is not found in the argument list of vlc_openat(int fd, const char *filename, int flags,...)

    include/vlc_fs.h:92: warning: The following parameter of vlc_openat(int fd, const char *filename, int flags,...) is not documented:
      parameter 'fd'
2023-08-03 08:56:58 +00:00
Steve Lhomme 3b3a8b396f vlc_fs: always map lseek to _lseeki64 on Windows
We can safely pass int64_t offsets this way.
2023-01-07 22:21:26 +00:00
Steve Lhomme d57b9a4c0c vlc_fs: make the internal vlc_DIR type private on Windows 2022-08-03 11:44:10 +00:00
Steve Lhomme b95df4e1fe vlc_fs: export vlc_closedir/vlc_rewinddir
So it matches the other exports
2022-08-03 11:44:10 +00:00
Steve Lhomme 15b65c6082 win32: filesystem: use the native Win32 API to list folder contents
The API is available on UWP builds and doesn't rely on dirent which may not be
compiled as UNICODE in mingw-w64.

The call to FindFirstFileExW already gets the first entry so we are always
ahead of one entry.
2022-08-03 11:44:10 +00:00
Steve Lhomme 4862e4195c vlc_fs: always use a custom type for our opendir API's
This will avoid some dirty casts between DIR and vlc_DIR on Windows.

The Windows handling could be done entirely without dirent.h which is not a
standard Windows API.
2022-08-03 11:44:10 +00:00
Steve Lhomme 92240d23be vlc_fs: move up vlc_DIR declaration
No functional changes.
2022-08-03 11:44:10 +00:00
Steve Lhomme 30375359b6 vlc_fs: add vlc_closedir/vlc_rewinddir for all platforms
To have a cleaner balance between the directory API calls.
2022-08-03 11:44:10 +00:00
Alexandre Janniaux 6b3e51834c vlc_fs: fix doxygen comments 2021-08-09 10:14:18 +00:00
Rémi Denis-Courmont 6788528b13 filesystem: add vlc_dup2() wrapper 2020-11-30 18:04:49 +02:00
Rémi Denis-Courmont 4c75d5a4ae fs: clean up vlc_dup() documentation 2020-11-29 15:54:29 +02:00
Rémi Denis-Courmont 417ed9eb80 include: layer the plugin API documentation 2018-02-11 21:55:42 +02:00
Rémi Denis-Courmont 582355f965 src: add vlc_close() wrapper 2016-04-22 00:11:34 +03:00
Jean-Baptiste Kempf 7ff25f9810 vlc_fs: Fix win32 compilation 2015-08-24 23:23:40 +02:00
Rémi Denis-Courmont ab29a4598b filesystem: add vlc_memfd() helper 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
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 128a1f1724 include: improve vlc_fs.h documentation 2015-06-03 20:08:21 +03:00
Rémi Denis-Courmont ee0b9164f9 vlc_readdir: remove string duplication, simplify 2014-01-27 18:56:15 +02:00
Felix Abecassis b7916b9ff6 Avoid redeclaration of lseek under MSVC.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2013-11-30 21:16:46 +01:00
Rafaël Carré 6d53362001 Use _WIN32 rather than WIN32 (same for WIN64)
http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx only
mentions the _ prefixed variable.

gcc will always define the _ prefixed variable, like Visual Studio.
The prefixless one is defined in some language standards, e.g. gnu99
but not c99.
2013-06-05 16:06:10 +02:00
Jean-Baptiste Kempf f9536fbd1e Win32: undef lseek before redefining it 2013-01-15 16:10:40 +01:00
Rémi Denis-Courmont a7b2dcf0ee Remove WinCE 2012-09-02 12:22:01 +03:00
Sébastien Toque e917fdc8fe Android: fix large files support
Signed-off-by: Rafaël Carré <funman@videolan.org>
2012-06-19 09:21:37 +02:00
Rafaël Carré 5a7311926d Win32: move 64 bits lseek define to vlc_fs.h 2012-06-19 09:20:24 +02:00
Naohiro KORIYAMA 5b877e456b Win32: define fstat as well as stat
Fix wrong result of stream_Size() on win32 build.

Signed-off-by: Rafaël Carré <funman@videolan.org>
2012-02-01 20:59:38 -05:00
Rafaël Carré 67d04d60fc wince: don't define stat struct 2012-02-01 15:22:13 -05:00
Rémi Denis-Courmont 0acd892b33 Win32: some compilers fail to define stat correctly 2012-02-01 19:31:05 +02:00
Rémi Denis-Courmont 3fe85b3841 Win32: struct stat is a macro so we need to include <sys/stat.h> 2012-02-01 18:00:04 +02:00
Rémi Denis-Courmont 359e03c3cc Win32: do not redefine stat/fstat, fix piles of warnings
MingW picks the correct version according to _FILE_OFFSET_BITS.
Of course, we use 64-bits offsets for large files.
2012-01-27 23:31:49 +02:00
Rémi Denis-Courmont 9ce7c7d986 Move 'struct stat' forward declaration where actually needed 2012-01-27 23:31:49 +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
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 92f1b3aee7 Rename LIBVLC_* function attributes to VLC_* within plugin API 2011-05-07 23:08:28 +03:00
Rémi Denis-Courmont 6f258887aa Replace VLC_EXPORT macro with a simple prefix, VLC_API
This should help Doxygen parse VLC headers, and generally makes headers
easier to read. LibVLC already uses a similar approach.
2011-05-07 18:43:51 +03:00
Rémi Denis-Courmont c8778a818a Implement vlc_pipe() 2011-02-09 23:00:13 +02:00
Geoffroy Couprie 86c91b1fbe Windows: use _wrewinddir instead of rewinddir
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2010-11-05 15:34:46 +01:00
Rémi Denis-Courmont 358998994e Win32: fix closedir() to match vlc_opendir()
Parental advisory: explicit kludge.
2010-11-03 20:36:19 +02:00
Rémi Denis-Courmont fa343f78a5 Compile fix 2010-03-31 23:41:55 +03:00
Rémi Denis-Courmont a2f2d51d03 vlc_accept: accept() with close-on-exec 2010-03-31 19:23:47 +03:00
Rémi Denis-Courmont 3eb3e72a31 vlc_socket: create socket with close-on-exec à la vlc_dup() 2010-03-31 19:07:47 +03:00
Keary Griffin a6d9514276 export vlc_rename
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2010-03-31 17:37:45 +03:00
Rémi Denis-Courmont 6b8a408fdb utf8_lstat -> vlc_lstat for consistency 2010-03-03 23:32:21 +02:00
Rémi Denis-Courmont 37ae6248dd add vlc_openat wrapper around openat 2010-02-14 13:33:23 +02:00
Rémi Denis-Courmont 71a1c8a68f vlc_dup: dup with close-on-exec 2010-02-07 15:52:32 +02:00
Rémi Denis-Courmont 7e45ab1b28 utf8_* -> vlc_* (sed roxxors) 2010-02-07 15:25:29 +02:00
Rémi Denis-Courmont d601e4ed29 Split file path functions out of vlc_charset.h into vlc_fs.h 2010-02-07 15:19:37 +02:00