Skip to content

Commit

Permalink
* error.c (Init_syserr): moved to the template.
Browse files Browse the repository at this point in the history
  (errno_missing): removed. fixed [ruby-dev:35958].

* defs/knwon_errors.def: added. extracted from Init_syserr.

* templates/known_errors.inc.tmpl: added. Template for Init_syserr.
  c.f. [ruby-dev:35958].

* tools/generic_erb.rb: added. general purpose mapper which maps
  data+template into source code.

* common.mk (error.$(OBJEXT), incs, known_errors.inc):
  Fixed dependencies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
yugui committed Sep 26, 2008
1 parent 9ea58e6 commit 16c95b4
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 386 deletions.
16 changes: 16 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Fri Sep 26 17:07:04 2008 Yuki Sonoda (Yugui) <[email protected]>

* error.c (Init_syserr): moved to the template.
(errno_missing): removed. fixed [ruby-dev:35958].

* defs/knwon_errors.def: added. extracted from Init_syserr.

* templates/known_errors.inc.tmpl: added. Template for Init_syserr.
c.f. [ruby-dev:35958].

* tools/generic_erb.rb: added. general purpose mapper which maps
data+template into source code.

* common.mk (error.$(OBJEXT), incs, known_errors.inc):
Fixed dependencies.

Fri Sep 26 17:02:04 2008 Nobuyoshi Nakada <[email protected]>

* thread.c (thlist_signal): clears the woken thread if nothing woke.
Expand Down
7 changes: 5 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ encoding.$(OBJEXT): {$(VPATH)}encoding.c $(RUBY_H_INCLUDES) \
enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \
{$(VPATH)}util.h
enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES)
error.$(OBJEXT): {$(VPATH)}error.c $(RUBY_H_INCLUDES) \
error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}known_errors.inc $(RUBY_H_INCLUDES) \
$(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h {$(VPATH)}parse.y
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h \
$(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_error.c \
Expand Down Expand Up @@ -629,7 +629,7 @@ srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c $(srcdir)/ext/ripper
srcs-enc: $(ENC_MK)
$(MAKE) -f $(ENC_MK) RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) srcs

incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h $(srcdir)/revision.h
incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h {$(VPATH)}known_errors.inc $(srcdir)/revision.h

insns: $(INSNS)

Expand All @@ -644,6 +644,9 @@ transdb.h: $(PREP) srcs-enc
$(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $@.new $(srcdir)/enc/trans enc/trans
$(IFCHANGE) "$@" "$@.new"

known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
$(BASERUBY) $(srcdir)/tool/generic_erb.rb $+ > $@

miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
$(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@

Expand Down
122 changes: 122 additions & 0 deletions defs/known_errors.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
EPERM
ENOENT
ESRCH
EINTR
EIO
ENXIO
E2BIG
ENOEXEC
EBADF
ECHILD
EAGAIN
ENOMEM
EACCES
EFAULT
ENOTBLK
EBUSY
EEXIST
EXDEV
ENODEV
ENOTDIR
EISDIR
EINVAL
ENFILE
EMFILE
ENOTTY
ETXTBSY
EFBIG
ENOSPC
ESPIPE
EROFS
EMLINK
EPIPE
EDOM
ERANGE
EDEADLK
ENAMETOOLONG
ENOLCK
ENOSYS
ENOTEMPTY
ELOOP
EWOULDBLOCK
ENOMSG
EIDRM
ECHRNG
EL2NSYNC
EL3HLT
EL3RST
ELNRNG
EUNATCH
ENOCSI
EL2HLT
EBADE
EBADR
EXFULL
ENOANO
EBADRQC
EBADSLT
EDEADLOCK
EBFONT
ENOSTR
ENODATA
ETIME
ENOSR
ENONET
ENOPKG
EREMOTE
ENOLINK
EADV
ESRMNT
ECOMM
EPROTO
EMULTIHOP
EDOTDOT
EBADMSG
EOVERFLOW
ENOTUNIQ
EBADFD
EREMCHG
ELIBACC
ELIBBAD
ELIBSCN
ELIBMAX
ELIBEXEC
EILSEQ
ERESTART
ESTRPIPE
EUSERS
ENOTSOCK
EDESTADDRREQ
EMSGSIZE
EPROTOTYPE
ENOPROTOOPT
EPROTONOSUPPORT
ESOCKTNOSUPPORT
EOPNOTSUPP
EPFNOSUPPORT
EAFNOSUPPORT
EADDRINUSE
EADDRNOTAVAIL
ENETDOWN
ENETUNREACH
ENETRESET
ECONNABORTED
ECONNRESET
ENOBUFS
EISCONN
ENOTCONN
ESHUTDOWN
ETOOMANYREFS
ETIMEDOUT
ECONNREFUSED
EHOSTDOWN
EHOSTUNREACH
EALREADY
EINPROGRESS
ESTALE
EUCLEAN
ENOTNAM
ENAVAIL
EISNAM
EREMOTEIO
EDQUOT
Loading

0 comments on commit 16c95b4

Please sign in to comment.