Skip to content

Commit

Permalink
patches: mirror various
Browse files Browse the repository at this point in the history
  • Loading branch information
DomT4 committed Sep 13, 2015
1 parent 480b714 commit ec8d133
Show file tree
Hide file tree
Showing 13 changed files with 3,267 additions and 0 deletions.
102 changes: 102 additions & 0 deletions OpenSSH/launchd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
--- a/channels.c 2015-07-02 18:36:28.000000000 +0200
+++ b/channels.c 2015-07-02 18:37:07.000000000 +0200
@@ -4037,15 +4037,35 @@ x11_connect_display(void)
* connection to the real X server.
*/

- /* Check if the display is from launchd. */
#ifdef __APPLE__
- if (strncmp(display, "/tmp/launch", 11) == 0) {
- sock = connect_local_xsocket_path(display);
- if (sock < 0)
- return -1;
+ /* Check if the display is a path to a socket (as set by launchd). */
+ {
+ char path[PATH_MAX];
+ struct stat sbuf;
+ int is_path_to_socket = 0;
+
+ strlcpy(path, display, sizeof(path));
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket = 1;
+ } else {
+ char *dot = strrchr(path, '.');
+ if (dot) {
+ *dot = '\0';
+ /* screen = atoi(dot + 1); */
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket=1;
+ }
+ }
+ }

- /* OK, we now have a connection to the display. */
- return sock;
+ if (is_path_to_socket) {
+ sock = connect_local_xsocket_path(path);
+ if (sock < 0)
+ return -1;
+
+ /* OK, we now have a connection to the display. */
+ return sock;
+ }
}
#endif
/*
--- a/clientloop.c 2015-07-02 18:36:28.000000000 +0200
+++ b/clientloop.c 2015-07-02 18:37:07.000000000 +0200
@@ -314,6 +314,10 @@ client_x11_get_proto(const char *display
struct stat st;
u_int now, x11_timeout_real;

+#if __APPLE__
+ int is_path_to_socket = 0;
+#endif /* __APPLE__ */
+
xauthdir = xauthfile = NULL;
*_proto = proto;
*_data = data;
@@ -329,6 +333,33 @@ client_x11_get_proto(const char *display
debug("x11_get_proto: DISPLAY not set");
return;
}
+#if __APPLE__
+ {
+ /*
+ * If using launchd socket, remove the screen number from the end
+ * of $DISPLAY. is_path_to_socket is used later in this function
+ * to determine if an error should be displayed.
+ */
+ char path[PATH_MAX];
+ struct stat sbuf;
+
+ strlcpy(path, display, sizeof(path));
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket = 1;
+ } else {
+ char *dot = strrchr(path, '.');
+ if (dot) {
+ *dot = '\0';
+ /* screen = atoi(dot + 1); */
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket = 1;
+ debug("x11_get_proto: $DISPLAY is launchd, removing screennum");
+ setenv("DISPLAY", path, 1);
+ }
+ }
+ }
+ }
+#endif /* __APPLE__ */
/*
* Handle FamilyLocal case where $DISPLAY does
* not match an authorization entry. For this we
@@ -420,6 +451,9 @@ client_x11_get_proto(const char *display
if (!got_data) {
u_int32_t rnd = 0;

+#if __APPLE__
+ if (!is_path_to_socket)
+#endif /* __APPLE__ */
logit("Warning: No xauth data; "
"using fake authentication data for X11 forwarding.");
strlcpy(proto, SSH_X11_PROTO, sizeof proto);
13 changes: 13 additions & 0 deletions clucene/patch-src-shared-CLucene-LuceneThreads.h.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
https://sourceforge.net/p/clucene/bugs/219/
--- a/src/shared/CLucene/LuceneThreads.h
+++ b/src/shared/CLucene/LuceneThreads.h
@@ -7,6 +7,9 @@
#ifndef _LuceneThreads_h
#define _LuceneThreads_h

+#if defined(_CL_HAVE_PTHREAD)
+ #include <pthread.h>
+#endif

CL_NS_DEF(util)
class CLuceneThreadIdCompare;
63 changes: 63 additions & 0 deletions clucene/patch-src-shared-CLucene-config-repl_tchar.h.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
https://sourceforge.net/p/clucene/bugs/219/
--- a/src/shared/CLucene/config/repl_tchar.h
+++ b/src/shared/CLucene/config/repl_tchar.h
@@ -28,26 +28,26 @@
#define _istdigit iswdigit //* digit char check
#define _totlower towlower //* convert char to lower case
#define _totupper towupper //* convert char to lower case
- #define _tcslwr wcslwr //* convert string to lower case
+ #define _tcslwr std::wcslwr //* convert string to lower case

//these are the string handling functions
//we may need to create wide-character/multi-byte replacements for these
- #define _tcscpy wcscpy //copy a string to another string
- #define _tcsncpy wcsncpy //copy a specified amount of one string to another string.
- #define _tcscat wcscat //copy a string onto the end of the other string
- #define _tcsncat wcsncat
- #define _tcschr wcschr //find location of one character
- #define _tcsstr wcsstr //find location of a string
- #define _tcslen wcslen //get length of a string
- #define _tcscmp wcscmp //case sensitive compare two strings
- #define _tcsncmp wcsncmp //case sensitive compare two strings
- #define _tcscspn wcscspn //location of any of a set of character in a string
+ #define _tcscpy std::wcscpy //copy a string to another string
+ #define _tcsncpy std::wcsncpy //copy a specified amount of one string to another string.
+ #define _tcscat std::wcscat //copy a string onto the end of the other string
+ #define _tcsncat std::wcsncat
+ #define _tcschr std::wcschr //find location of one character
+ #define _tcsstr std::wcsstr //find location of a string
+ #define _tcslen std::wcslen //get length of a string
+ #define _tcscmp std::wcscmp //case sensitive compare two strings
+ #define _tcsncmp std::wcsncmp //case sensitive compare two strings
+ #define _tcscspn std::wcscspn //location of any of a set of character in a string

//string compare
#ifdef _CL_HAVE_FUNCTION_WCSICMP
- #define _tcsicmp wcsicmp //* case insensitive compare two string
+ #define _tcsicmp std::wcsicmp //* case insensitive compare two string
#else
- #define _tcsicmp wcscasecmp //* case insensitive compare two string
+ #define _tcsicmp std::wcscasecmp //* case insensitive compare two string
#endif
#if defined(_CL_HAVE_FUNCTION_WCSDUP)
#define _tcsdup wcsdup
@@ -56,8 +56,8 @@
#endif

//conversion functions
- #define _tcstod wcstod //convert a string to a double
- #define _tcstoi64 wcstoll //* convers a string to an 64bit bit integer
+ #define _tcstod std::wcstod //convert a string to a double
+ #define _tcstoi64 std::wcstoll //* convers a string to an 64bit bit integer
#define _itot _i64tot
#define _i64tot lltow //* converts a 64 bit integer to a string (with base)
#else //if defined(_ASCII)
@@ -105,7 +105,7 @@
//some tchar headers miss these...
#ifndef _tcstoi64
#if defined(_UCS2)
- #define _tcstoi64 wcstoll //* convers a string to an 64bit bit integer
+ #define _tcstoi64 std::wcstoll //* convers a string to an 64bit bit integer
#else
#define _tcstoi64 strtoll
#endif
55 changes: 55 additions & 0 deletions graphviz/patch-project.pbxproj.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
--- macosx/graphviz.xcodeproj/project.pbxproj.orig 2012-08-13 15:14:54.000000000 -0500
+++ macosx/graphviz.xcodeproj/project.pbxproj 2012-08-14 13:59:30.000000000 -0500
@@ -380,12 +380,10 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
- ../lib/cdt/.libs,
- ../lib/cgraph/.libs,
- ../lib/gvc/.libs,
+ "$(PREFIX)/lib",
);
PRODUCT_NAME = Graphviz;
- USER_HEADER_SEARCH_PATHS = "../lib/common ../lib/cdt ../lib/pathplan ../lib/cgraph ../lib/gvc";
+ USER_HEADER_SEARCH_PATHS = "$(PREFIX)/include/graphviz";
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
};
@@ -403,13 +401,10 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
- ../lib/cdt/.libs,
- ../lib/cgraph/.libs,
- ../lib/gvc/.libs,
+ "$(PREFIX)/lib",
);
PRODUCT_NAME = Graphviz;
- USER_HEADER_SEARCH_PATHS = "../lib/common ../lib/cdt ../lib/pathplan ../lib/cgraph ../lib/gvc";
- VALID_ARCHS = "i386 x86_64";
+ USER_HEADER_SEARCH_PATHS = "$(PREFIX)/include/graphviz";
WRAPPER_EXTENSION = app;
};
name = Release;
@@ -420,21 +415,15 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Debug;
};
C05733CD08A9546B00998B17 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Release;
};
72 changes: 72 additions & 0 deletions id3lib/id3lib-main.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
diff -Naurp id3lib-3.8.3.orig/examples/demo_convert.cpp id3lib-3.8.3/examples/demo_convert.cpp
--- id3lib-3.8.3.orig/examples/demo_convert.cpp 2003-03-01 16:23:00.000000000 -0800
+++ id3lib-3.8.3/examples/demo_convert.cpp 2011-06-28 21:37:42.000000000 -0700
@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTag
}
}

-int main( unsigned int argc, char * const argv[])
+int main(int argc, char * const argv[])
{
flags_t ulFlag = ID3TT_ALL;
gengetopt_args_info args;
diff -Naurp id3lib-3.8.3.orig/examples/demo_copy.cpp id3lib-3.8.3/examples/demo_copy.cpp
--- id3lib-3.8.3.orig/examples/demo_copy.cpp 2003-03-01 16:23:00.000000000 -0800
+++ id3lib-3.8.3/examples/demo_copy.cpp 2011-06-28 21:37:42.000000000 -0700
@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTag
}
}

-int main( unsigned int argc, char * const argv[])
+int main(int argc, char * const argv[])
{
int ulFlag = ID3TT_ID3;
ID3D_INIT_DOUT();
diff -Naurp id3lib-3.8.3.orig/examples/demo_info.cpp id3lib-3.8.3/examples/demo_info.cpp
--- id3lib-3.8.3.orig/examples/demo_info.cpp 2003-03-01 16:23:00.000000000 -0800
+++ id3lib-3.8.3/examples/demo_info.cpp 2011-06-28 21:37:42.000000000 -0700
@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myT

#define DEBUG

-int main( unsigned int argc, char * const argv[])
+int main(int argc, char * const argv[])
{
ID3D_INIT_DOUT();

diff -Naurp id3lib-3.8.3.orig/examples/demo_tag.cpp id3lib-3.8.3/examples/demo_tag.cpp
--- id3lib-3.8.3.orig/examples/demo_tag.cpp 2003-03-01 16:23:00.000000000 -0800
+++ id3lib-3.8.3/examples/demo_tag.cpp 2011-06-28 21:37:42.000000000 -0700
@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTag
os << "v2";
}

-int main( unsigned int argc, char * const argv[])
+int main(int argc, char * const argv[])
{
int ulFlag = ID3TT_ID3;
ID3D_INIT_DOUT();
diff -Naurp id3lib-3.8.3.orig/examples/findeng.cpp id3lib-3.8.3/examples/findeng.cpp
--- id3lib-3.8.3.orig/examples/findeng.cpp 2003-03-01 16:23:00.000000000 -0800
+++ id3lib-3.8.3/examples/findeng.cpp 2011-06-28 21:37:42.000000000 -0700
@@ -9,7 +9,7 @@
using std::cout;
using std::endl;

-int main(unsigned argc, char* argv[])
+int main(int argc, char* argv[])
{
ID3D_INIT_DOUT();
ID3D_INIT_WARNING();
diff -Naurp id3lib-3.8.3.orig/examples/findstr.cpp id3lib-3.8.3/examples/findstr.cpp
--- id3lib-3.8.3.orig/examples/findstr.cpp 2003-03-01 16:23:00.000000000 -0800
+++ id3lib-3.8.3/examples/findstr.cpp 2011-06-28 21:37:42.000000000 -0700
@@ -9,7 +9,7 @@
using std::cout;
using std::endl;

-int main(unsigned argc, char* argv[])
+int main(int argc, char* argv[])
{
ID3D_INIT_DOUT();
ID3D_INIT_WARNING();
11 changes: 11 additions & 0 deletions id3lib/id3lib-vbr-overflow.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- id3lib-3.8.3.orig/src/mp3_parse.cpp.org 2003-03-02 01:23:00.000000000 +0100
+++ id3lib-3.8.3/src/mp3_parse.cpp 2009-09-27 19:44:18.000000000 +0200
@@ -465,7 +465,7 @@
// from http://www.xingtech.com/developer/mp3/

const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed
- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional
+ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional

if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE)
{
76 changes: 76 additions & 0 deletions id3lib/r112430/automake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
--- a/configure.in.orig 2013-01-05 10:23:58.000000000 -0800
+++ a/configure.in 2013-01-05 10:25:32.000000000 -0800
@@ -11,11 +11,12 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-# require autoconf 2.13
-AC_PREREQ(2.13)
+# require autoconf 2.63
+AC_PREREQ(2.63)

# init autoconf (and check for presence fo reconf)
AC_INIT(reconf)
+AC_CONFIG_MACRO_DIR([m4])

ID3LIB_NAME=id3lib

@@ -83,7 +84,7 @@ ID3LIB_FULLNAME=$ID3LIB_NAME-$ID3LIB_VER

AC_SUBST(ID3LIB_FULLNAME)

-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

@@ -168,7 +169,7 @@ if test $has_iconv = 1; then
iconv_oldstyle=1, iconv_oldstyle=0)
if test $iconv_oldstyle = 1; then
AC_MSG_RESULT(const char **)
- AC_DEFINE(ID3LIB_ICONV_OLDSTYLE)
+ AC_DEFINE(ID3LIB_ICONV_OLDSTYLE, 1, [Desc])
#we'll check out the need of
#typecast in the call of iconv_open
AC_MSG_CHECKING(whether to typecast in iconv)
@@ -184,7 +185,7 @@ if test $has_iconv = 1; then
iconv_cast=0, iconv_cast=1)
if test $iconv_cast = 1; then
AC_MSG_RESULT(yes)
- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
+ AC_DEFINE(ID3LIB_ICONV_CAST_OK, 1, [Desc])
else
AC_MSG_RESULT(no)
fi
@@ -206,7 +207,7 @@ if test $has_iconv = 1; then
iconv_cast=0, iconv_cast=1)
if test $iconv_cast = 1; then
AC_MSG_RESULT(yes)
- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
+ AC_DEFINE(ID3LIB_ICONV_CAST_OK, 1, [Desc])
else
AC_MSG_RESULT(no)
fi
@@ -296,12 +297,6 @@ AC_DEFINE_UNQUOTED(_ID3LIB_INTERFACE_AGE
AC_DEFINE_UNQUOTED(_ID3LIB_BINARY_AGE, $ID3LIB_BINARY_AGE)
AC_DEFINE_UNQUOTED(_ID3_COMPILED_WITH_DEBUGGING, "${enable_debug}")

-CONDITIONAL_SUBDIRS=
-if test "x$ac_cv_lib_z_uncompress" = "xno"; then
- CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib"
-fi
-AC_CONFIG_SUBDIRS(zlib)
-
CFLAGS="$CFLAGS -Wall"

AC_OUTPUT( \
--- a/Makefile.am.orig 2013-01-05 10:25:44.000000000 -0800
+++ a/Makefile.am 2013-01-05 10:26:37.000000000 -0800
@@ -11,6 +11,7 @@

# require automake 1.5
AUTOMAKE_OPTIONS = 1.5
+ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = \
HISTORY \
Loading

0 comments on commit ec8d133

Please sign in to comment.