Skip to content

Commit

Permalink
* include/ruby: moved public headers.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jun 10, 2007
1 parent 1b8a677 commit 2b59258
Show file tree
Hide file tree
Showing 124 changed files with 647 additions and 409 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sun Jun 10 12:07:41 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>

* include/ruby: moved public headers.

Sun Jun 10 10:42:04 2007 Tanaka Akira <akr@fsij.org>

* lib/securerandom.rb: renamed from lib/secrand.rb.
Expand Down
6 changes: 4 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NULLCMD = :
#### Start of system configuration section. ####

srcdir = @srcdir@
VPATH = $(srcdir):$(srcdir)/missing
hdrdir = $(srcdir)/include

CC = @CC@
YACC = bison
Expand Down Expand Up @@ -32,11 +32,13 @@ RDOCTARGET = @RDOCTARGET@

EXTOUT = @EXTOUT@
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
arch_hdrdir = $(EXTOUT)/include/$(arch)
VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/missing

empty =
OUTFLAG = @OUTFLAG@$(empty)
CFLAGS = @CFLAGS@ @ARCH_FLAG@
XCFLAGS = -I. -I$(srcdir) @XCFLAGS@
XCFLAGS = -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS =
Expand Down
6 changes: 3 additions & 3 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
**********************************************************************/

#include "ruby.h"
#include "util.h"
#include "st.h"
#include "ruby/ruby.h"
#include "ruby/util.h"
#include "ruby/st.h"

VALUE rb_cArray;

Expand Down
2 changes: 1 addition & 1 deletion bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**********************************************************************/

#include "ruby.h"
#include "ruby/ruby.h"

#include <math.h>
#include <float.h>
Expand Down
4 changes: 2 additions & 2 deletions blockinlining.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
**********************************************************************/

#include "ruby.h"
#include "node.h"
#include "ruby/ruby.h"
#include "ruby/node.h"
#include "yarvcore.h"

VALUE yarv_new_iseqval(VALUE node, VALUE name, VALUE file,
Expand Down
8 changes: 4 additions & 4 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
**********************************************************************/

#include "ruby.h"
#include "rubysig.h"
#include "node.h"
#include "st.h"
#include "ruby/ruby.h"
#include "ruby/signal.h"
#include "ruby/node.h"
#include "ruby/st.h"
#include <ctype.h>

extern st_table *rb_class_tbl;
Expand Down
170 changes: 85 additions & 85 deletions common.mk

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compar.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**********************************************************************/

#include "ruby.h"
#include "ruby/ruby.h"

VALUE rb_mComparable;

Expand Down
4 changes: 2 additions & 2 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
**********************************************************************/

#include "ruby.h"
#include "node.h"
#include "ruby/ruby.h"
#include "ruby/node.h"

#include "yarvcore.h"
#include "compile.h"
Expand Down
27 changes: 22 additions & 5 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,11 @@ AC_MINIX
AC_SUBST(RM, ['rm -f'])
AC_SUBST(CP, ['cp'])
if $as_mkdir_p; then
AC_SUBST(MAKEDIRS, ['mkdir -p'])
MAKEDIRS='mkdir -p'
else
AC_SUBST(MAKEDIRS, ['install -d'])
MAKEDIRS='install -d'
fi
AC_SUBST(MAKEDIRS)

dnl check for large file stuff
AC_SYS_LARGEFILE
Expand Down Expand Up @@ -1271,7 +1272,7 @@ fi
AC_SUBST(MINIRUBY)
AC_SUBST(PREP)
AC_SUBST(RUNRUBY)
AC_SUBST(EXTOUT, [${EXTOUT-.ext}])
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])

FIRSTMAKEFILE=""
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
Expand Down Expand Up @@ -1607,6 +1608,19 @@ if test "$search_path" != ""; then
AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path")
fi

AC_ARG_WITH(rubyhdrdir,
[ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]],
[rubyhdrdir=$withval],
[rubyhdrdir='${includedir}/ruby-${MAJOR}.${MINOR}'])

AC_ARG_WITH(sitehdrdir,
[ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]],
[sitehdrdir=$withval],
[sitehdrdir='${rubyhdrdir}/site_ruby'])

AC_SUBST(rubyhdrdir)dnl
AC_SUBST(sitehdrdir)dnl

AC_ARG_WITH(mantype,
[ --with-mantype=TYPE specify man page type; TYPE is one of man and doc],
[
Expand Down Expand Up @@ -1646,11 +1660,14 @@ AC_ARG_WITH(baseruby,
])
AC_SUBST(BASERUBY)

if test -f config.h && tr -d '\015' < confdefs.h | cmp -s config.h -; then
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
$MAKEDIRS "${arch_hdrdir}"
config_h="${arch_hdrdir}/config.h"
if test -f "${config_h}" && tr -d '\015' < confdefs.h | cmp -s "${config_h}" -; then
echo "config.h unchanged"
else
echo "creating config.h"
tr -d '\015' < confdefs.h > config.h
tr -d '\015' < confdefs.h > "${config_h}"
fi
: > confdefs.h

Expand Down
2 changes: 1 addition & 1 deletion cont.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**********************************************************************/

#include "ruby.h"
#include "ruby/ruby.h"
#include "yarvcore.h"
#include "gc.h"
#include "eval_intern.h"
Expand Down
2 changes: 1 addition & 1 deletion cygwin/GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $(RUBY_EXP): $(LIBRUBY_A)
GNUmakefile: $(srcdir)/cygwin/GNUmakefile.in

ifeq (@target_os@,mingw32)
$(OBJS) $(MAINOBJ): win32/win32.h
$(OBJS) $(MAINOBJ): win32.h

$(LIBRUBY_SO): $(RUBYDEF)

Expand Down
2 changes: 1 addition & 1 deletion debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**********************************************************************/

#include "ruby.h"
#include "ruby/ruby.h"
#include "debug.h"

void
Expand Down
4 changes: 2 additions & 2 deletions debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#ifndef _DEBUG_H_INCLUDED_
#define _DEBUG_H_INCLUDED_

#include <ruby.h>
#include <node.h>
#include "ruby/ruby.h"
#include "ruby/node.h"

#define dpv(h,v) ruby_debug_value(-1, 0, h, v)
#define dp(v) ruby_debug_value(-1, 0, "", v)
Expand Down
4 changes: 2 additions & 2 deletions dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
**********************************************************************/

#include "ruby.h"
#include "ruby/ruby.h"

#include <sys/types.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -61,7 +61,7 @@ char *strchr(char*,char);

#include <ctype.h>

#include "util.h"
#include "ruby/util.h"

#if !defined HAVE_LSTAT && !defined lstat
#define lstat stat
Expand Down
6 changes: 3 additions & 3 deletions dln.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**********************************************************************/

#include "ruby.h"
#include "ruby/ruby.h"
#include "dln.h"

#ifdef HAVE_STDLIB_H
Expand Down Expand Up @@ -182,8 +182,8 @@ static int dln_init_p = 0;

#define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC)

#include "util.h"
#include "st.h"
#include "ruby/util.h"
#include "ruby/st.h"

static st_table *sym_tbl;
static st_table *undef_tbl;
Expand Down
6 changes: 3 additions & 3 deletions enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
**********************************************************************/

#include "ruby.h"
#include "node.h"
#include "util.h"
#include "ruby/ruby.h"
#include "ruby/node.h"
#include "ruby/util.h"

VALUE rb_mEnumerable;
static ID id_each, id_eqq, id_cmp;
Expand Down
2 changes: 1 addition & 1 deletion enumerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
************************************************/

#include "ruby.h"
#include "ruby/ruby.h"

/*
* Document-class: Enumerable::Enumerator
Expand Down
4 changes: 2 additions & 2 deletions error.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
**********************************************************************/

#include "ruby.h"
#include "st.h"
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "yarvcore.h"

#include <stdio.h>
Expand Down
10 changes: 5 additions & 5 deletions eval_intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
(GET_THREAD()->passed_block = \
GC_GUARDED_PTR_REF((rb_block_t *)GET_THREAD()->cfp->lfp[0]))

#include "ruby.h"
#include "node.h"
#include "util.h"
#include "rubysig.h"
#include "ruby/ruby.h"
#include "ruby/node.h"
#include "ruby/util.h"
#include "ruby/signal.h"
#include "yarvcore.h"

#ifdef HAVE_STDLIB_H
Expand All @@ -25,7 +25,7 @@
#include <stdio.h>
#include <setjmp.h>

#include "st.h"
#include "ruby/st.h"
#include "dln.h"

#ifdef __APPLE__
Expand Down
3 changes: 1 addition & 2 deletions ext/bigdecimal/bigdecimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/

#include "ruby.h"
#include "ruby/ruby.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
Expand All @@ -22,7 +22,6 @@
#include <float.h>
#include <math.h>
#include "math.h"
#include "version.h"

/* #define ENABLE_NUMERIC_STRING */

Expand Down
2 changes: 1 addition & 1 deletion ext/digest/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "mkmf"

$INSTALLFILES = {
"digest.h" => "$(RUBYARCHDIR)"
"digest.h" => "$(HDRDIR)"
}

create_makefile("digest")
7 changes: 3 additions & 4 deletions ext/dl/cptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
* $Id$
*/

#include <ruby.h>
#include <rubyio.h>
#include <ruby/ruby.h>
#include <ruby/io.h>
#include <ctype.h>
#include <version.h> /* for ruby version code */
#include "dl.h"

VALUE rb_cDLCPtr;
Expand Down Expand Up @@ -421,7 +420,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val)
rb_io_t *fptr;
FILE *fp;
GetOpenFile(val, fptr);
#if RUBY_VERSION_CODE >= 190
#if HAVE_RB_IO_STDIO_FILE
fp = rb_io_stdio_file(fptr);
#else
fp = fptr->f;
Expand Down
5 changes: 2 additions & 3 deletions ext/dl/dl.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <ruby.h>
#include <rubyio.h>
#include <version.h>
#include <ruby/ruby.h>
#include <ruby/io.h>
#include <ctype.h>
#include "dl.h"

Expand Down
4 changes: 3 additions & 1 deletion ext/dl/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
end

$INSTALLFILES = [
["dl.h", "$(archdir)$(target_prefix)", ""],
["dl.h", "$(HDRDIR)"],
]
$distcleanfiles << "callback.h"

Expand All @@ -26,5 +26,7 @@
end

if( check )
have_func("rb_io_stdio_file", "ruby/ruby.h")
$defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"]
create_makefile("dl")
end
Loading

0 comments on commit 2b59258

Please sign in to comment.