Skip to content

Instantly share code, notes, and snippets.


Kubo Takehiro kubo

  • Japan
View GitHub Profile
kubo / 01-mtime-subsec.dif
Last active Jul 1, 2017 Apply 01-mtime-subsec.dif and then 02-file-utime.dif
View 01-mtime-subsec.dif
diff --git a/dir.c b/dir.c
index 3db196f..426d0b6 100644
--- a/dir.c
+++ b/dir.c
@@ -1300,9 +1300,9 @@ to_be_ignored(int e)
#ifdef _WIN32
-#define STAT(p, s) rb_w32_ustati64((p), (s))
+#define STAT(p, s) rb_w32_ustati64ns((p), (s))
View select-number.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *gContext = NULL;
#define CHK_WITH_ERR(func, err) do { \
int rv = (func); \
if (rv < 0) { \
View hot_patch.dif
diff --git a/src/ b/src/
index 5e4d7f2..759bcaf 100644
--- a/src/
+++ b/src/
@@ -279,6 +279,23 @@ static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_
if (ud_obj.mnemonic == UD_Ijmp || ud_obj.mnemonic == UD_Icall ||
ud_obj.operand[0].type == UD_OP_JIMM)
+#ifdef __i386__
+ const BYTE *pc = (const BYTE *)targetFunction + InstrSize;

This document has been obsolete since Oracle Instant Client 12.1 for OS X was released. The 12.1 client supports OS X 10.11 El Capitan, 10.10 Yosemite, and 10.9 Mavericks and can connect to Oracle Database 10.2 or later.

Look at [this document][inst] to install 12.1.

You should add the environment variable FORCE_RPATH to link with -rpath on compilation. (You have no need to set the environment variable at runtime.)

kubo /
Last active May 28, 2016
Install node-oracledb on OS X 10.11 El Capitan

This document has been obsolete. Look at here instead.

The followings are obsolete.

This page is combination of node-oracledb document and ruby-oci8 document.

Some parts are copied from node-oracledb. Some parts are copied from ruby-oci8.

Install C compiler

View extconf.rb
require 'mkmf'
View ociconnect.c
* Test program for
* gcc -o ociconnect32 ociconnect.c -I$ORACLE_HOME/rdbms/public -L$ORACLE_HOME/lib32 -R$ORACLE_HOME/lib32 -lclntsh
* gcc -m64 -o ociconnect64 ociconnect.c -I$ORACLE_HOME/rdbms/public -L$ORACLE_HOME/lib -R$ORACLE_HOME/lib -lclntsh
#include <stdio.h>
#include <unistd.h>
#include <oci.h>
View wait_timeout.dif
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 2de46e4..b10507e 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -134,6 +134,11 @@ static void oci8_svcctx_init(oci8_base_t *base)
oci8_svcctx_t *svcctx = (oci8_svcctx_t *)base;
VALUE obj;
+ svcctx-> = &svcctx->waiters;
kubo / geometry-sample.rb
Last active Dec 10, 2015
This is sample code to bind GeoRuby objects as SDO_GEOMETRY datatype. See:
View geometry-sample.rb
require 'oci8'
require 'geo_ruby'
module OCI8::Object::Mdsys
class SdoGeometry < OCI8::Object::Base
class OCI8::BindType::GeoRuby < OCI8::BindType::Object
View fix-issue-20-2.dif
diff --git a/VERSION b/VERSION
index eca07e4..fb94c56 100644
@@ -1 +1 @@
diff --git a/ext/oci8/lob.c b/ext/oci8/lob.c
index 4289a3a..d18a539 100644
--- a/ext/oci8/lob.c