Skip to content

Instantly share code, notes, and snippets.

Hideki ONO yellowback

Block or report user

Report or block yellowback

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yellowback
yellowback / mariadb-for-netbsd.patch
Last active Apr 3, 2018
mariadb patch for netbsd
View mariadb-for-netbsd.patch
--- mariadb-5.5.59/mysys/mysys_priv.h 2018-01-19 02:10:31.000000000 +0900
+++ mariadb-5.5.59/mysys/mysys_priv.h 2018-04-03 18:20:05.000000000 +0900
@@ -89,6 +89,7 @@
void my_error_unregister_all(void);
+#ifndef __NetBSD__
#ifndef O_PATH /* not Linux */
#if defined(O_SEARCH) /* Illumos */
#define O_PATH O_SEARCH
View serendipity_event_bbcode.php.diff
diff --git a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php
index 8c9aac1..6460d01 100644
--- a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php
+++ b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php
@@ -54,7 +54,9 @@ class serendipity_event_bbcode extends serendipity_event
function bbcode_callback($matches) {
$type = $matches[1];
- $input = trim($matches[2], "\r\n");
+ $input = str_replace("<br />\r\n","foobarbaz123454321",$matches[2]);
View serendipity_lang_ja.inc.php.diff
diff --git a/lang/UTF-8/serendipity_lang_ja.inc.php b/lang/UTF-8/serendipity_lang_ja.inc.php
index 258005f..a5b8c3f 100644
--- a/lang/UTF-8/serendipity_lang_ja.inc.php
+++ b/lang/UTF-8/serendipity_lang_ja.inc.php
@@ -7,7 +7,7 @@
@define('LANG_CHARSET', 'UTF-8');
@define('SQL_CHARSET', 'utf8');
@define('DATE_LOCALES', 'ja_JP.UTF-8,ja,jp');
-@define('DATE_FORMAT_ENTRY', '%Y年 %B %e(%A)');
+@define('DATE_FORMAT_ENTRY', '%Y-%m-%d');
View serendipity_event_nl2br.php.diff
diff --git a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php
index 37ceae6..532937b 100644
--- a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php
+++ b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php
@@ -152,8 +152,12 @@ class serendipity_event_nl2br extends serendipity_event
}
function restore($text) {
- global $_buf;
- return preg_replace('~\001(\d+)~e', '$_buf[$1]', $text);
View mysqld
#!/bin/sh
#
# $NetBSD: mysqld.sh,v 1.1.1.1 2011/04/25 21:12:15 adam Exp $
#
# PROVIDE: mysqld
# REQUIRE: DAEMON LOGIN mountall
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start MySQL:
#
View mod_pagespeed-chromium-prcpucfg.h.diff
Index: third_party/nspr/prcpucfg.h
===================================================================
--- third_party/nspr/prcpucfg.h (revision 161115)
+++ third_party/nspr/prcpucfg.h (working copy)
@@ -42,6 +42,8 @@
#include "base/third_party/nspr/prcpucfg_freebsd.h"
#elif defined(__OpenBSD__)
#include "base/third_party/nspr/prcpucfg_openbsd.h"
+#elif defined(__NetBSD__)
+#include "base/third_party/nspr/prcpucfg_openbsd.h"
View mod_pagespeed-chromium-stack_trace_posix.cc.diff
Index: debug/stack_trace_posix.cc
===================================================================
--- debug/stack_trace_posix.cc (revision 161115)
+++ debug/stack_trace_posix.cc (working copy)
@@ -124,7 +124,7 @@
trace_strings->push_back(base::StringPrintf("%p", trace[i]));
}
}
-#else
+#elif defined(OS_LINUX)
View mod_pagespeed-chromium-debugger_posix.cc.diff
Index: debug/debugger_posix.cc
===================================================================
--- debug/debugger_posix.cc (revision 161115)
+++ debug/debugger_posix.cc (working copy)
@@ -125,7 +125,7 @@
is_set = true;
#if defined(OS_FREEBSD)
being_debugged = (info.ki_flag & P_TRACED) != 0;
-#elif defined(OS_BSD)
+#elif defined(OS_BSD) && !defined(OS_NETBSD)
View mod_pagespeed-pthread_thread_system.cc.diff
Index: net/instaweb/util/pthread_thread_system.cc
===================================================================
--- net/instaweb/util/pthread_thread_system.cc (revision 2937)
+++ net/instaweb/util/pthread_thread_system.cc (working copy)
@@ -135,7 +135,11 @@
}
int64 PthreadThreadSystem::ThreadId() const {
+#if defined(__NetBSD__)
+ return reinterpret_cast<int64>(pthread_self());
View mod_pagespeed-pthread_shared_mem.cc.diff
Index: net/instaweb/util/pthread_shared_mem.cc
===================================================================
--- net/instaweb/util/pthread_shared_mem.cc (revision 2937)
+++ net/instaweb/util/pthread_shared_mem.cc (working copy)
@@ -24,6 +24,9 @@
#include <cstddef>
#include <map>
#include <utility>
+#if defined(__NetBSD__)
+#include <semaphore.h>
You can’t perform that action at this time.