Skip to content

Instantly share code, notes, and snippets.

Avatar

Kubo Takehiro kubo

  • Japan
View GitHub Profile
View crc32_test.c
/*
* Copy this file to the root directory of snzip source tree and compile it as follows:
*
* gcc -o crc32_test crc32_test.c crc32.c crc32_sse4_2.c -msse4.2
*/
#include <stdio.h>
#include "crc32.h"
/* See https://tools.ietf.org/html/rfc3720#appendix-B.4 */
typedef struct {
View test218.c
/*
* ORACLE_HOME-based client:
*
* gcc -o test218 test218.c -I$ORACLE_HOME/rdbms/public -L$ORACLE_HOME/lib -Wl,-rpath,$ORACLE_HOME/lib -lclntsh
*
* Instant client:
*
* IC_DIR=/xxxx # Instant client directory
* gcc -o test218 test218.c -I$IC_DIR/sdk/include -L$IC_DIR -Wl,-rpath,$IC_DIR -lclntsh
*
View lob-read-test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oci.h>
/*
Run the following SQL in advance.
drop table clob_test_1755 purge;
create table clob_test_1755 (clob_col clob);
View oranum-from-test-overun.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *g_context;
#define chkerr(func) do { \
if ((func) < 0) { \
dpiErrorInfo err; \
@kubo
kubo / lauxlib.c
Last active May 6, 2018
os.execute('exit -1') on windows. patch.dif is a patch file for lua 5.3.x. lauxlib.c, loslib.c and liolib.c are patched files of lua 5.3.4.
View lauxlib.c
/*
** $Id: lauxlib.c,v 1.289 2016/12/20 18:37:00 roberto Exp $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
#define lauxlib_c
#define LUA_LIB
#include "lprefix.h"
View install_cx_Oracle_on_elcapitan.md

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.)

View object-type-attr.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *g_context;
#define chkerr(func) do { \
if ((func) < 0) { \
dpiErrorInfo err; \
View merge-stmt-info.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *g_context;
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
View bind-negative-time-zone-minute-offset.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *g_context;
#define chkerr(func) do { \
if ((func) < 0) { \
dpiErrorInfo err; \
View number-attr.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <dpi.h>
static dpiContext *g_context;
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))