1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-12 13:44:56 +02:00
Commit Graph

131 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
5abe21ee48 vasprintf: missing #include 2015-07-06 22:50:25 +03:00
Rémi Denis-Courmont
67888a9779 Add replacement for GNU ffsll() 2015-06-28 15:19:49 +03:00
Rémi Denis-Courmont
73ef184d3e localtime_r: fix Annex K usage 2015-06-26 18:00:24 +03:00
Rémi Denis-Courmont
74337dd2f2 compat: reimplement and make poll() alertable on Windows 2015-05-17 14:49:43 +03:00
Rémi Denis-Courmont
80170ba796 fixups: add missing poll() event flags 2015-05-17 13:30:17 +03:00
Rémi Denis-Courmont
d60d5102b8 compat: fix localtime_r() replacement
- Do not clobber thread-specific state on Windows
 - Be thread-safe on non-Windows
2015-03-16 19:20:44 +02:00
Rémi Denis-Courmont
4716a65fc6 freeaddrinfo: rewrite as iterative 2014-11-22 11:20:24 +02:00
KO Myung-Hun
3180272a56 libstream_out_standard_plugin: fix linkage on OS/2
Move freeaddrinfo() to compat/.

-----
  CCLD     libstream_out_standard_plugin.la
weakld: error: Unresolved symbol (UNDEF) '_freeaddrinfo'.
weakld: info: The symbol is referenced by:
    P:\tmp\ldconv_libstream_out_standard_plugin_48c454704dac1660d0.obj
Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _freeaddrinfo is an undefined reference
file P:/tmp\ldconv_libstream_out_standard_plugin_48c454704dac1660d0.obj(ldconv_libstream_out_standard_plugin_48c454704dac1660d0.obj): undefined symbol _freeaddrinfo
-----

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2014-11-22 11:17:31 +02:00
KO Myung-Hun
5064767f8e compat: poll: fix compilation
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-08-28 21:06:48 +02:00
Rémi Denis-Courmont
5ac516c9c7 poll: deal with invalid file descriptors more like specified 2014-08-17 16:29:41 +03:00
Rémi Denis-Courmont
c4199ab677 Remove inconsistently used HAVE_UNISTD_H 2013-12-29 16:15:46 +02:00
Felix Abecassis
a580223d2c network: undef EAFNOSUPPORT before overriding it.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2013-11-30 15:27:40 +02: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
Rafaël Carré
f5e991c748 Remove untested strncasecmp replacement
Since it never built, it was never needed on any platform
2013-01-15 09:36:51 +01:00
Rémi Denis-Courmont
82e41d14d7 Win32: try to fix build on some Mingw versions 2012-10-22 18:24:39 +03:00
Rémi Denis-Courmont
2f8990294e Win32: correctly implement flockfile() et al
This should fix gibberish interlaced log messages.
2012-10-18 18:41:51 +03:00
Rémi Denis-Courmont
294f9cc858 compat: (pretend to) implement getpid() on NaCl 2012-09-08 19:14:32 +03:00
Rémi Denis-Courmont
a7b2dcf0ee Remove WinCE 2012-09-02 12:22:01 +03:00
Rémi Denis-Courmont
c05b7fdf1e gmtime_r: rewrite, now truly thread-safe 2012-04-16 23:26:25 +03:00
Rémi Denis-Courmont
7222ec2719 Fix MacOS compilation (probably) 2012-03-01 19:28:37 +02:00
Rémi Denis-Courmont
66b102008a Replace posix_memalign() 2012-02-29 18:59:54 +02:00
Antoine Cellerier
44432d8f51 Add strverscmp from glibc 2.14.1 to compat. 2012-02-04 17:46:26 +01:00
KO Myung-Hun
459a325085 Include 'sys/time.h' for 'struct timeval' on OS/2
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2012-01-27 23:36:28 +02:00
Rémi Denis-Courmont
80d860b676 Move poll() to compat/ 2012-01-19 20:17:07 +02:00
Rémi Denis-Courmont
78d45cc159 compat: install the static import library
With libcompat installed (into $(prefix)/lib/vlc/ or whatever), libtool
will actually pull only needed functions from the static import library
libcompat.a. Previously, it would copy every compat functions into
every VLC binaries. This should shrink plugins a bit.
2012-01-19 20:12:14 +02:00
Rémi Denis-Courmont
38227c2441 Remove dirfd() hacks 2012-01-03 18:35:02 +02:00
Geraud CONTINSOUZAS
3ac083ca42 fix missing dirfd references for FreeBSD
Signed-off-by: Rafaël Carré <funman@videolan.org>
2012-01-02 19:10:30 -05:00
Naohiro KORIYAMA
6d0a1fce49 inet_ntop always returns NULL on Windows.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2011-12-03 11:23:52 +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
5ceabdd8d3 Rewrite inet_pton() and inet_ntop() into compat
This should correct error handling cases.
2011-11-03 20:36:17 +02:00
Rémi Denis-Courmont
05a7af68c4 vasprintf: rewrite. va_copy() was missing. 2011-10-26 21:12:44 +03:00
Naohiro Koriyama
44c39efdc1 Implement dirfd() on MacOS
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2011-10-11 19:05:32 +03:00
Jean-Baptiste Kempf
42419926ec strtok_r: remove tabs 2011-10-05 10:55:32 +02:00
Jean-Baptiste Kempf
04b2f96e8c Compat: relicense strtok_r to LGPL
The code was done by Clement Chesnin, who agreed on the change
2011-10-05 10:52:15 +02:00
Jean-Baptiste Kempf
0d2b232440 Compat: relicense strsep to LGPL
The code was done by Laurent Aimar, in 2008
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
b1296dcbf9 Compat: relicense strcasestr to LGPL
Work done by Laurent Aimar, Derk-Jan Hartman (back when it was in
demux/util/sub.c in 2003) and Rémi Denis-Courmont
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
4eebe9d21e Compat: relicense strncasecmp to LGPL
Original work in src/extras/libc.c done by:
 - Samuel Hocevar
 - Gildas Bazin
Current work done and adaptation done by:
 - Rémi Denis-Courmont
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
21514ffa26 Compat: relicense vasprintf, strlcpy and localtime_r to LGPL
Code done by Rémi Denis-Courmont
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
663d74ff85 Compat: relicense strtoll to LGPL
The main author of this part is:
 - Gildas Bazin

Contributors include:
 - Laurent Aimar
 - Rémi Denis-Courmont
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
7852b1cc5e Compat: fix copyright 2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
4aec3e9660 Compat: relicense some functions to LGPL
asprintf, atof, atoll, gmtime_r, lldiv, rewind, strdup, strndup,
strnlen, strtof, strcasecmp

Mostly thanks to Rémi Denis-Courmont.
Some code was inspired from older VLC core code and sometimes trivial.
The old code was done by:
 - Laurent Aimar
 - Samuel Hocevar
 - Derk-Jan Hartman
 - Gildas Bazin
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
48a1b3871f Compat: relicense swab to LGPL
Code done by Laurent Aimar
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
9589549d39 Compat: relicense setenv.c to LGPL
This is work done by Rémi Denis-Courmont
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
820d208a89 Compat: relicense getpid to LGPL
Code is Pierre Ynard, aka linkfanel
2011-10-04 23:08:40 +02:00
Jean-Baptiste Kempf
2be4980ee4 Compat: fix LGPL headers
Missing a "Lesser" in the legal part
2011-10-04 23:08:40 +02:00
Rémi Denis-Courmont
22e5015caf Missing #include 2011-09-04 12:33:14 +03:00
Rémi Denis-Courmont
d8f977410a Replace fdopendir() 2011-09-03 12:54:53 +03:00
Rémi Denis-Courmont
487b7594aa compat: fix use of <ctype.h> functions
Unfortunately, the C standard requires an 'unsigned char' value or EOF.
So we cannot blindly pass a 'char' value, which may be signed depending
on the architecture.
2011-08-29 19:20:10 +03:00
Rémi Denis-Courmont
0dfcbe01cd Silent rules for dummy.c 2011-08-25 19:06:33 +03:00
Rémi Denis-Courmont
5e39cb277c Remove getcwd() replacement 2011-07-11 18:51:11 +03:00
Pierre Ynard
ea89401362 WinCE: skip fsync() replacement 2011-06-22 01:20:13 +02:00
Rémi Denis-Courmont
cda2009e72 Win32: fsync() replacement 2011-06-18 12:26:06 +03:00
Rémi Denis-Courmont
4f477ba9eb flockfile stub 2011-05-11 19:41:50 +03:00
Rémi Denis-Courmont
07594e8b43 dirfd: replacement 2011-04-03 19:33:38 +03:00
Rémi Duraffort
06ba6877cb Comment out atof and strtof. Android does provide them but the configure does not find them. 2011-02-28 19:17:31 +01:00
Rémi Denis-Courmont
6dd92709b3 Fix compilation if getenv() is missing 2011-02-13 10:14:56 +02:00
Rémi Denis-Courmont
c7681744de Replacement for setenv() and unsetenv() 2011-02-12 22:33:17 +02:00
Rémi Duraffort
315f8e47d9 More cleaner fix when tdestroy only is missing. 2010-12-13 14:43:19 +01:00
Rémi Duraffort
c40c90cf6f tsearch functions: check for the presence of search.h and replace tdestroy.
If search.h is present but not tdestroy: implement it based on others t* functions
If search.h and tdestroy are not present: implement every t* functions.
2010-12-07 14:37:16 +01:00
Rémi Duraffort
8b02394e5e t* remove the dependence to cdefs.h 2010-12-06 19:12:28 +01:00
Rémi Duraffort
1d69914ece tdestroy: fix compilation for system that does have search.h but not tdestroy. 2010-12-06 17:51:54 +01:00
Rémi Duraffort
c489a903fa Implement tsearch functions for systems that does not know about it. 2010-12-06 17:45:29 +01:00
Rémi Denis-Courmont
61bbf16ff4 Fix typo 2010-08-29 05:57:47 +03:00
Rémi Denis-Courmont
f7d33ffa57 Make sure libcompat is never empty 2010-08-01 13:00:56 +03:00
Rémi Denis-Courmont
ef4f0e4d7a Replacement for getdelim and getline - fixes #3503 2010-04-08 18:50:02 +03:00
Rémi Denis-Courmont
d663d29a58 Also provide erand48 and jrand48, they come almost for free 2010-03-06 11:31:34 +02:00
Rémi Denis-Courmont
df9356f54b nrand48: small fixes 2010-03-06 09:50:53 +02:00
Rémi Denis-Courmont
6268a229b1 nrand48 replacement
This is the POSIX linear congruential pseudo-random generator with
48-bits of state. It is non-secure/reproducible and thread-safe.
rand() is not thread-safe and *ahem* must not be used in VLC code.
rand_r() is thread-safe but obsoleted in POSIX.2008.

For secure random numbers, use the slower vlc_rand_bytes().
vlc_rand_bytes() can also be used to generate the seed if you are short
on idea for a 48-bits pseudo-random value.
2010-03-06 00:03:27 +02:00
Rémi Denis-Courmont
812f6667c9 Revert "compat: implement tdestroy (GNU extension not available on OpenBSD)."
This reverts commit 714d615571.

Conflicts:

	compat/tdestroy.c
	include/vlc_fixups.h
2010-01-06 14:23:10 +02:00
Rémi Duraffort
4f2f56a58c Source files must not be executable. 2009-11-24 22:17:37 +01:00
Rémi Denis-Courmont
b1efb935f0 Latin-1 -> UTF-8 2009-11-24 23:06:43 +02:00
Rémi Duraffort
136ebd846f tdestroy: fix encoding. 2009-11-24 22:05:11 +01:00
Rémi Duraffort
714d615571 compat: implement tdestroy (GNU extension not available on OpenBSD). 2009-11-24 21:58:57 +01:00
Clement Chesnin
aa6665a322 Add strtok_r() replacement
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2009-11-21 12:44:37 +02:00
Pierre Ynard
f22b0d94f8 WinCE: add replacement getpid() function
And remove #ifdefs from code
2009-08-27 11:14:10 +02:00
Pierre Ynard
be531987f6 WinCE: add replacement getcwd() function
As WinCE doesn't support working directories, this function is
basically empty, and merely returns an error.
2009-05-21 00:11:37 +02:00
Laurent Aimar
e8689aeac0 Implemented replacement for swab. 2009-04-12 15:33:19 +02:00
Rémi Denis-Courmont
4385b3b040 Fix strcasestr replacement 2009-04-11 20:59:13 +03:00
Rémi Denis-Courmont
8186391531 Move remaining replacement to static import library 2009-04-10 22:17:13 +03:00
Rémi Denis-Courmont
003bdf4a18 Mention which standard replacements follow 2009-04-10 22:12:30 +03:00
Rémi Denis-Courmont
e1a78b744b Start moving replacement functions to a static import library 2009-04-10 20:14:10 +03:00