Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating: SDL is no longer built automatically.

  • Loading branch information...
commit ddffeef1d89ce0ad55c5efd9373ca7a19d537f01 1 parent 9f590d2
Hongwei Xi authored
View
6 Makefile
@@ -182,15 +182,15 @@ atsopt1_gc::
###### contrib libraries ######
contrib::
-ifdef HAVE_LIBGLIB20
+ifeq ($(HAVE_LIBGLIB20),1)
cd contrib/glib; make atsctrb_glib.o; make clean
endif
-ifdef HAVE_LIBGTK20
+ifeq ($(HAVE_LIBGTK20),1)
cd contrib/cairo; make atsctrb_cairo.o; make clean
cd contrib/pango; make atsctrb_pango.o; make clean
cd contrib/GTK; make atsctrb_GTK.o; make clean
endif
-ifdef HAVE_LIBSDL
+ifeq ($(HAVE_LIBSDL10),1)
cd contrib/SDL; make atsctrb_SDL.o; make clean
endif
View
3  config.h.in
@@ -31,9 +31,6 @@
/* Define to 1 if you have the `posix_memalign' function. */
#undef HAVE_POSIX_MEMALIGN
-/* Define to 1 if you have SDL-1.0 */
-#undef HAVE_SDL
-
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
View
2  config.mk.in
@@ -25,4 +25,4 @@ ATSHOMEQ := "$(ATSHOME)"
HAVE_LIBGMP := @HAVE_LIBGMP@
HAVE_LIBGLIB20 := @HAVE_LIBGLIB20@
HAVE_LIBGTK20 := @HAVE_LIBGTK20@
-HAVE_LIBSDL := @HAVE_LIBSDL@
+HAVE_LIBSDL10 := @HAVE_LIBSDL10@
View
10 configure.ac
@@ -98,11 +98,11 @@ dnl = check for [GL/gl.h GL/glut.h]
dnl = AC_CHECK_HEADERS(GL/gl.h GL/glut.h)
dnl = check for [SDL]
-AM_PATH_SDL(1.0.0, [
- AC_DEFINE([HAVE_SDL], [1], [Define to 1 if you have SDL-1.0])
- have_sdl=1
-])
-AC_SUBST(HAVE_LIBSDL, $have_sdl)
+dnl = AM_PATH_SDL(1.0.0, [
+dnl = AC_DEFINE([HAVE_LIBSDL10], [1], [Define to 1 if you have SDL-1.0])
+dnl = have_sdl=1
+dnl = ])
+dnl = AC_SUBST(HAVE_LIBSDL10, $have_sdl)
dnl = check for SIZEOF_VOIDP
AC_CHECK_SIZEOF(void*)
View
11 libc/CATS/signal.cats
@@ -72,11 +72,18 @@ typedef struct sigaction ats_sigaction_type ;
/* ****** ****** */
-#define atslib_sigwait sigwait
+#define atslib_signal signal
/* ****** ****** */
-#define atslib_signal signal
+#define atslib_kill kill
+#define atslib_killpg killpg
+#define atslib_pthread_kill pthread_kill
+#define atslib_raise raise
+
+/* ****** ****** */
+
+#define atslib_sigwait sigwait
/* ****** ****** */
View
1  libc/CATS/stdlib.cats
@@ -67,6 +67,7 @@ atspre_exit_prerrf(ats_int_type code, ats_ptr_type fmt, ...) ;
/* ****** ****** */
+#define atslib_abort aboirt
#define atslib__Exit _Exit
#define atslib_atexit atexit
View
25 libc/SATS/signal.sats
@@ -46,6 +46,8 @@ staload TYPES = "libc/sys/SATS/types.sats"
typedef pid_t = $TYPES.pid_t
typedef uid_t = $TYPES.uid_t
typedef clock_t = $TYPES.clock_t
+staload PTHREAD = "libc/SATS/pthread.sats"
+typedef pthread_t = $PTHREAD.pthread_t
(* ****** ****** *)
//
@@ -193,11 +195,32 @@ fun sigaction_null
(* ****** ****** *)
fun signal
- (sn: signum_t, f: sighandler_t): sighandler_t = "#atslib_signal"
+ (sgn: signum_t, f: sighandler_t): sighandler_t = "#atslib_signal"
// end of [signal]
(* ****** ****** *)
+fun kill // 0/-1 : succ/fail // errno set
+ (proc: pid_t, sgn: signum_t): int = "#atslib_kill"
+// end of [kill]
+//
+// HX: killpg (pgrp, sgn) = kill (-pgrp, sgn)
+//
+fun killpg // 0/-1 : succ/fail // errno set
+ (pgrp: pid_t, sgn: signum_t): int = "#atslib_killpg"
+// end of [killpg]
+fun pthread_kill // 0/errno : succ/fail
+ (tid: pthread_t, sgn: signum_t): int = "#atslib_pthread_kill"
+// end of [pthread_kill]
+//
+// HX: raise(sgn) = pthread_kill (pthread_self, sgn)
+//
+fun raise // 0/errno : succ/fail
+ (sgn: signum_t): int = "#atslib_raise" // 0/nz : succ/fail
+// end of [raise]
+
+(* ****** ****** *)
+
fun sigwait ( // 0/pos : succ/fail
set: &sigset_t, sgn: &signum_t? >> opt (signum_t, i==0)
) : #[i:int | i >= 0] int(i) = "#atslib_sigwait"
View
2  libc/SATS/stdlib.sats
@@ -86,6 +86,8 @@ fun system (cmd: string): int = "#atslib_system" // !macro
(* ****** ****** *)
+fun abort (): void = "#atslib_abort"
+
fun _Exit (status: int): void = "#atslib__Exit" // !macro
fun atexit (f: () -> void): int = "#atslib_atexit" // !macro
Please sign in to comment.
Something went wrong with that request. Please try again.