Skip to content

Instantly share code, notes, and snippets.

Avatar

KOGURO, Naoki nkoguro

View GitHub Profile
View gist:e2853e3c5abc5229738d782c08247bd2
diff --git a/doc/modgauche.texi b/doc/modgauche.texi
index 692e1c0..a95eccd 100644
--- a/doc/modgauche.texi
+++ b/doc/modgauche.texi
@@ -4400,11 +4400,11 @@ would produce something like this:
@example
#include <stdio.h>
-int main(){
+int main()@{
View port-tell.patch
diff --git a/src/portapi.c b/src/portapi.c
index 6d4e12b..7782117 100644
--- a/src/portapi.c
+++ b/src/portapi.c
@@ -951,17 +951,30 @@ int Scm_CharReadyUnsafe(ScmPort *p)
* PortSeek
*/
+#ifndef PORT_UNREAD_BYTES /* common part */
+#define PORT_UNREAD_BYTES port_unread_bytes
@nkoguro
nkoguro / gist:41b32c679d92ae133786
Created Feb 27, 2015
build error at f6acb30b7798382c557d19c64b63ffc3ec95a2ff
View gist:41b32c679d92ae133786
if [ . != "." ]; then ./wirebuildlibs "." "ln -s"; fi
for d in gc src lib ext doc examples; do (cd $d; /Applications/Xcode.app/Contents/Developer/usr/bin/make all) || exit 1; done
depbase=`echo allchblk.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -Wall -Wextra -g -O2 -fno-strict-aliasing -DDONT_ADD_BYTE_AT_END -MT allchblk.lo -MD -MP -MF $depbase.Tpo -c -o allchblk.lo allchblk.c &&\
mv -f $depbase.Tpo $depbase.Plo
depbase=`echo alloc.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -Wall -Wextra -g -O2 -fno-strict-aliasing -DDONT_ADD_BYTE_AT_END -MT alloc.lo -MD -MP -MF $depbase.Tpo -c -o alloc.lo alloc.c &&\
mv -f $depbase.Tpo $depbase.Plo
depbase=`echo blacklst.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool
@nkoguro
nkoguro / gist:7a0508caa2dae1c0959c
Created Sep 13, 2014
Fix the mishandling of the boxer and unboxer in define-cptr
View gist:7a0508caa2dae1c0959c
diff --git a/lib/gauche/cgen/stub.scm b/lib/gauche/cgen/stub.scm
index 1541e33..cb1a68e 100644
--- a/lib/gauche/cgen/stub.scm
+++ b/lib/gauche/cgen/stub.scm
@@ -1593,8 +1593,8 @@
(make-cgen-type scm-name c-type
(x->string scm-name) ; description
(x->string c-pred)
- (x->string c-boxer)
- (x->string c-unboxer))
@nkoguro
nkoguro / gist:10cddd784b6f5237cc83
Created Jul 20, 2014
Fix gauche-package templates.
View gist:10cddd784b6f5237cc83
diff --git a/ext/template.Makefile.in b/ext/template.Makefile.in
index 4955643..1273e0e 100644
--- a/ext/template.Makefile.in
+++ b/ext/template.Makefile.in
@@ -70,5 +70,5 @@ distclean : clean
rm -rf $(CONFIG_GENERATED)
maintainer-clean : clean
- rm -rf $(CONFIG_GENERATED) configure VERSION
+ rm -rf $(CONFIG_GENERATED) VERSION
View test.scm.diff
diff --git a/lib/gauche/test.scm b/lib/gauche/test.scm
index d23089f..6451243 100644
--- a/lib/gauche/test.scm
+++ b/lib/gauche/test.scm
@@ -336,7 +336,7 @@
(let loop ([r '()] [code (code->list (closure-code closure))])
(cond [(null? code) r]
[(and (pair? (car code))
- (memq (caar code) '(GREF-CALL GREF-TAIL-CALL)))
+ (memq (caar code) '(GREF-CALL PUSH-GREF-CALL GREF-TAIL-CALL PUSH-GREF-TAIL-CALL)))
@nkoguro
nkoguro / float.h.diff
Created Sep 21, 2013
Fix a compile error in Gauche HEAD on arm architecture.
View float.h.diff
diff --git a/src/gauche/float.h b/src/gauche/float.h
index 17daded..c23314d 100644
--- a/src/gauche/float.h
+++ b/src/gauche/float.h
@@ -117,7 +117,7 @@ extern unsigned int __cdecl _controlfp(unsigned int, unsigned int);
#define SCM_FP_ENSURE_DOUBLE_PRECISION_END() \
_controlfp(old_fpc_val__, _MCW_PC); }
-#elif defined(_FPU_GETCW) /* linux */
+#elif defined(_FPU_GETCW) && defined(_FPU_EXTENDED) /* linux x86 */