Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
099a0004
Commit
099a0004
authored
Nov 01, 2005
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete this one by mistake
parent
119e8f41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
0 deletions
+103
-0
extras/contrib/src/Patches/gettext.patch
extras/contrib/src/Patches/gettext.patch
+103
-0
No files found.
extras/contrib/src/Patches/gettext.patch
0 → 100644
View file @
099a0004
diff -ru gettext-original/gettext-runtime/intl/libgnuintl.h.in gettext/gettext-runtime/intl/libgnuintl.h.in
--- gettext-original/gettext-runtime/intl/libgnuintl.h.in Sun Nov 16 16:27:58 2003
+++ gettext/gettext-runtime/intl/libgnuintl.h.in Fri Aug 20 12:34:40 2004
@@ -280,7 +280,7 @@
or gettext() but for which the format string could be the return value
of _() or gettext() need to add this #include. Oh well. */
-#if !@HAVE_POSIX_PRINTF@
+#if !@HAVE_POSIX_PRINTF@ && !defined(__BEOS__)
#include <stdio.h>
#include <stddef.h>
diff -ru gettext-original/gettext-runtime/intl/printf.c gettext/gettext-runtime/intl/printf.c
--- gettext-original/gettext-runtime/intl/printf.c Wed Sep 17 18:09:12 2003
+++ gettext/gettext-runtime/intl/printf.c Fri Aug 20 12:34:40 2004
@@ -45,7 +45,7 @@
#include <stdio.h>
-#if !HAVE_POSIX_PRINTF
+#if !HAVE_POSIX_PRINTF && !defined(__BEOS__)
#include <stdlib.h>
#include <string.h>
diff -ru gettext-original/gettext-runtime/libasprintf/autosprintf.cc gettext/gettext-runtime/libasprintf/autosprintf.cc
--- gettext-original/gettext-runtime/libasprintf/autosprintf.cc Mon Oct 28 20:44:32 2002
+++ gettext/gettext-runtime/libasprintf/autosprintf.cc Fri Aug 20 13:09:56 2004
@@ -32,6 +32,51 @@
#include <string.h>
#include "lib-asprintf.h"
+#ifdef __BEOS__
+/* vasprintf emulation (borrowed from VLC) */
+#define vasprintf beossux_vasprintf
+int beossux_vasprintf(char **strp, const char *fmt, va_list ap)
+{
+ /* Guess we need no more than 100 bytes. */
+ int i_size = 100;
+ char *p = (char *) malloc( i_size );
+ int n;
+
+ if( p == NULL )
+ {
+ *strp = NULL;
+ return -1;
+ }
+
+ for( ;; )
+ {
+ /* Try to print in the allocated space. */
+ n = vsnprintf( p, i_size, fmt, ap );
+
+ /* If that worked, return the string. */
+ if (n > -1 && n < i_size)
+ {
+ *strp = p;
+ return strlen( p );
+ }
+ /* Else try again with more space. */
+ if (n > -1) /* glibc 2.1 */
+ {
+ i_size = n+1; /* precisely what is needed */
+ }
+ else /* glibc 2.0 */
+ {
+ i_size *= 2; /* twice the old size */
+ }
+ if( (p = (char *) realloc( p, i_size ) ) == NULL)
+ {
+ *strp = NULL;
+ return -1;
+ }
+ }
+}
+#endif
+
namespace gnu
{
diff -ru gettext-original/gettext-runtime/libasprintf/lib-asprintf.c gettext/gettext-runtime/libasprintf/lib-asprintf.c
--- gettext-original/gettext-runtime/libasprintf/lib-asprintf.c Fri Jun 20 14:52:05 2003
+++ gettext/gettext-runtime/libasprintf/lib-asprintf.c Fri Aug 20 12:34:40 2004
@@ -21,7 +21,7 @@
# include <config.h>
#endif
-#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF)
+#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF) && !defined(__BEOS__)
#define STATIC static
diff -ru gettext-original/gettext-runtime/libasprintf/lib-asprintf.h gettext/gettext-runtime/libasprintf/lib-asprintf.h
--- gettext-original/gettext-runtime/libasprintf/lib-asprintf.h Fri Jun 20 14:56:51 2003
+++ gettext/gettext-runtime/libasprintf/lib-asprintf.h Fri Aug 20 12:34:40 2004
@@ -21,7 +21,7 @@
# include <config.h>
#endif
-#if HAVE_VASPRINTF && HAVE_POSIX_PRINTF
+#if ( HAVE_VASPRINTF && HAVE_POSIX_PRINTF ) || defined(__BEOS__)
/* Get asprintf(), vasprintf() declarations. */
#include <stdio.h>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment