[mirmince commits] {mirmince} branch master updated. c3561e3b9a91bf29160bef60cc7cfd0f81c16fe4

tg at freewrt.org tg at freewrt.org
Fri Jun 14 22:31:12 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main git repository for FreeWRT project mirmince".

The branch, master has been updated
       via  c3561e3b9a91bf29160bef60cc7cfd0f81c16fe4 (commit)
      from  b318f92ca542d267eee24aec726dee4e67a1fd45 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c3561e3b9a91bf29160bef60cc7cfd0f81c16fe4
Author: Thorsten Glaser <tg at mirbsd.org>
Date:   Fri Jun 14 22:29:25 2013 +0000

    merge <mirmince/c.h> into <mirmince/asm.h>
    
    background story: we usually want to be able to use inline asm
    from the C part (even though it’s really discouraged); most of
    the C stuff is #ifndef __ASSEMBLER__ though so not the other way

-----------------------------------------------------------------------

Summary of changes:
 include/fcntl.h          |    4 +--
 include/mirmince/asm.h   |   59 ++++++++++++++++++++++++++++++++++
 include/mirmince/c.h     |   80 ----------------------------------------------
 include/mirmince/types.h |    2 +-
 include/stdlib.h         |    4 +--
 include/string.h         |    4 +--
 include/sys/types.h      |    4 +--
 include/unistd.h         |    4 +--
 md/i386/asm.h            |    4 +++
 md/i386/c.h              |    8 -----
 mi/vars.c                |    2 +-
 osdep/linux/asm.h        |    5 +++
 osdep/linux/c.h          |    9 ------
 osdep/linux/i386/asm.h   |    2 ++
 osdep/linux/i386/c.h     |    6 ----
 osdep/mirbsd/asm.h       |    2 ++
 osdep/mirbsd/c.h         |    6 ----
 osdep/mirbsd/i386/c.h    |    4 ---
 18 files changed, 84 insertions(+), 125 deletions(-)
 delete mode 100644 include/mirmince/c.h
 delete mode 100644 md/i386/c.h
 delete mode 100644 osdep/linux/c.h
 delete mode 100644 osdep/linux/i386/c.h
 delete mode 100644 osdep/mirbsd/c.h
 delete mode 100644 osdep/mirbsd/i386/c.h

diff --git a/include/fcntl.h b/include/fcntl.h
index 99a5174..1d827bd 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -1,8 +1,8 @@
 #ifndef FCNTL_H
 #define FCNTL_H
 
-#ifndef MIRMINCE_C_H
-#include <mirmince/c.h>
+#ifndef MIRMINCE_ASM_H
+#include <mirmince/asm.h>
 #endif
 
 #define MIRMINCE_NT_MODE_T
diff --git a/include/mirmince/asm.h b/include/mirmince/asm.h
index c39c298..ce33aa8 100644
--- a/include/mirmince/asm.h
+++ b/include/mirmince/asm.h
@@ -53,5 +53,64 @@
 #define END(x)			ENDSYM(_C_LABEL(x))
 #define EXTRN(x)		.globl _C_LABEL(x)
 
+#ifndef __ASSEMBLER__
+
+#ifdef __cplusplus
+#define __BEGIN_DECLS		extern "C" {
+#define __END_DECLS		}
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#endif
+
+#ifdef __GNUC__
+#define mirmince_bss		__attribute__((__section__ (".bss")))
+#define mirmince_cc_cdecl	__attribute__((__regparm__ (0), __cdecl__))
+#define mirmince_cc_regparm(x)	__attribute__((__regparm__ (x)))
+#define mirmince_dead		__attribute__((__noreturn__))
+#define mirmince_printf(x)	__attribute__((__printf__ x))
+#define mirmince_unused		__attribute__((__unused__))
+#else
+#define mirmince_bss
+#define mirmince_cc_cdecl	/* default */
+#define mirmince_cc_regparm(x)	/* not used */
+#define mirmince_dead
+#define mirmince_printf(x)
+#define mirmince_unused
+#endif
+
+#ifndef mirmince_cc_userspc
+#define mirmince_cc_userspc	mirmince_cc_cdecl
+#endif
+
+#ifndef mirmince_cc_syscall
+#define mirmince_cc_syscall	mirmince_cc_cdecl
+#endif
+
+#include mirmince_hdr_osdep(syscallc.h)
+
+#define NULL			((void *)0)
+
+/* CPU register wide types */
+#ifdef __mirmincE_arch_x32
+typedef unsigned long long mirmince_ureg;
+typedef signed long long mirmince_sreg;
+#else
+typedef unsigned long mirmince_ureg;
+typedef signed long mirmince_sreg;
+#endif
+
+/* specific bit wide types */
+typedef unsigned char mirmince_u8;
+typedef unsigned short mirmince_u16;
+typedef unsigned int mirmince_u32;
+typedef unsigned long long mirmince_u64;
+typedef signed char mirmince_s8;
+typedef signed short mirmince_s16;
+typedef signed int mirmince_s32;
+typedef signed long long mirmince_s64;
+
+#endif /* !__ASSEMBLER__ */
+
 #endif /* !MIRMINCE_ASM_H */
 #endif /* ELF */
diff --git a/include/mirmince/c.h b/include/mirmince/c.h
deleted file mode 100644
index d3e007b..0000000
--- a/include/mirmince/c.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __ELF__
-# error mirmince currently requires an ELF platform
-#else
-
-#ifndef MIRMINCE_C_H
-#define MIRMINCE_C_H
-
-#ifndef mirmince_hdr_PFX
-#ifdef __mirmincE_bootstrap
-#define mirmince_hdr_PFX
-#else
-#define mirmince_hdr_PFX	mirmince/
-#endif
-#define mirmince_hdr_sysinc(x)	< mirmince_hdr_PFX x >
-#define mirmince_hdr_md(x)	mirmince_hdr_sysinc(md/__mirmincE_arch__/x)
-#define mirmince_hdr_osdep(x)	mirmince_hdr_sysinc(osdep/__mirmincE_os__/x)
-#define mirmince_hdr_osmd(x)	mirmince_hdr_sysinc(osdep/__mirmincE_os__/__mirmincE_arch__/x)
-#endif
-
-#include mirmince_hdr_md(c.h)
-#include mirmince_hdr_osdep(c.h)
-#include mirmince_hdr_osmd(c.h)
-
-#ifdef __cplusplus
-#define __BEGIN_DECLS		extern "C" {
-#define __END_DECLS		}
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-
-#ifdef __GNUC__
-#define mirmince_bss		__attribute__((__section__ (".bss")))
-#define mirmince_cc_cdecl	__attribute__((__regparm__ (0), __cdecl__))
-#define mirmince_cc_regparm(x)	__attribute__((__regparm__ (x)))
-#define mirmince_dead		__attribute__((__noreturn__))
-#define mirmince_printf(x)	__attribute__((__printf__ x))
-#define mirmince_unused		__attribute__((__unused__))
-#else
-#define mirmince_bss
-#define mirmince_cc_cdecl	/* default */
-#define mirmince_cc_regparm(x)	/* not used */
-#define mirmince_dead
-#define mirmince_printf(x)
-#define mirmince_unused
-#endif
-
-#ifndef mirmince_cc_userspc
-#define mirmince_cc_userspc	mirmince_cc_cdecl
-#endif
-
-#ifndef mirmince_cc_syscall
-#define mirmince_cc_syscall	mirmince_cc_cdecl
-#endif
-
-#include mirmince_hdr_osdep(syscallc.h)
-
-#define NULL			((void *)0)
-
-/* CPU register wide types */
-#ifdef __mirmincE_arch_x32
-typedef unsigned long long mirmince_ureg;
-typedef signed long long mirmince_sreg;
-#else
-typedef unsigned long mirmince_ureg;
-typedef signed long mirmince_sreg;
-#endif
-
-/* specific bit wide types */
-typedef unsigned char mirmince_u8;
-typedef unsigned short mirmince_u16;
-typedef unsigned int mirmince_u32;
-typedef unsigned long long mirmince_u64;
-typedef signed char mirmince_s8;
-typedef signed short mirmince_s16;
-typedef signed int mirmince_s32;
-typedef signed long long mirmince_s64;
-
-#endif /* !MIRMINCE_C_H */
-#endif /* ELF */
diff --git a/include/mirmince/types.h b/include/mirmince/types.h
index 397296f..587d3d1 100644
--- a/include/mirmince/types.h
+++ b/include/mirmince/types.h
@@ -5,7 +5,7 @@
  * thing it defines
  */
 
-/* depends on c.h */
+/* depends on asm.h */
 #ifdef MIRMINCE_NT_MODE_T
 #ifndef MIRMINCE_DT_MODE_T
 typedef MIRMINCE_UT_MODE_T mode_t;
diff --git a/include/stdlib.h b/include/stdlib.h
index 50bfcc9..360b196 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,8 +1,8 @@
 #ifndef STDLIB_H
 #define STDLIB_H
 
-#ifndef MIRMINCE_C_H
-#include <mirmince/c.h>
+#ifndef MIRMINCE_ASM_H
+#include <mirmince/asm.h>
 #endif
 
 __BEGIN_DECLS
diff --git a/include/string.h b/include/string.h
index 904e90b..d6801a7 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1,8 +1,8 @@
 #ifndef STRING_H
 #define STRING_H
 
-#ifndef MIRMINCE_C_H
-#include <mirmince/c.h>
+#ifndef MIRMINCE_ASM_H
+#include <mirmince/asm.h>
 #endif
 
 #define MIRMINCE_NT_SIZE_T
diff --git a/include/sys/types.h b/include/sys/types.h
index 8d38699..4fe283a 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -1,8 +1,8 @@
 #ifndef SYS_TYPES_H
 #define SYS_TYPES_H
 
-#ifndef MIRMINCE_C_H
-#include <mirmince/c.h>
+#ifndef MIRMINCE_ASM_H
+#include <mirmince/asm.h>
 #endif
 
 /* incomplete list */
diff --git a/include/unistd.h b/include/unistd.h
index ddc36e5..7ad37ab 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,8 +1,8 @@
 #ifndef UNISTD_H
 #define UNISTD_H
 
-#ifndef MIRMINCE_C_H
-#include <mirmince/c.h>
+#ifndef MIRMINCE_ASM_H
+#include <mirmince/asm.h>
 #endif
 
 #define MIRMINCE_NT_GID_T
diff --git a/md/i386/asm.h b/md/i386/asm.h
index 4718aa8..08c81ae 100644
--- a/md/i386/asm.h
+++ b/md/i386/asm.h
@@ -14,4 +14,8 @@
 #define _ALIGN_DATA(x)		.balign x,0
 #endif
 
+#ifdef __mirmincE_use_regparm__
+#define mirmince_cc_userspc	mirmince_cc_regparm(__mirmincE_use_regparm__)
+#endif
+
 #endif
diff --git a/md/i386/c.h b/md/i386/c.h
deleted file mode 100644
index de24c06..0000000
--- a/md/i386/c.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef MIRMINCE_MD_I386_C_H
-#define MIRMINCE_MD_I386_C_H
-
-#ifdef __mirmincE_use_regparm__
-#define mirmince_cc_userspc	mirmince_cc_regparm(__mirmincE_use_regparm__)
-#endif
-
-#endif
diff --git a/mi/vars.c b/mi/vars.c
index ccf3b5e..17f00e2 100644
--- a/mi/vars.c
+++ b/mi/vars.c
@@ -2,7 +2,7 @@
  * global variables that every program needs
  */
 
-#include <mirmince/c.h>
+#include <mirmince/asm.h>
 
 /* required by the CSU */
 
diff --git a/osdep/linux/asm.h b/osdep/linux/asm.h
index 81b5a9a..62dc08b 100644
--- a/osdep/linux/asm.h
+++ b/osdep/linux/asm.h
@@ -18,4 +18,9 @@
 #define SYSCALL5D		SYSCALLD
 #define SYSCALL6D		SYSCALLD
 
+#ifdef __mirmincE_arch_i386
+/* reset -mrtd but keep regparm */
+#define mirmince_cc_syscall	mirmince_cc_cdecl mirmince_cc_regparm(3)
+#endif
+
 #endif
diff --git a/osdep/linux/c.h b/osdep/linux/c.h
deleted file mode 100644
index e08be80..0000000
--- a/osdep/linux/c.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef MIRMINCE_OSDEP_LINUX_C_H
-#define MIRMINCE_OSDEP_LINUX_C_H
-
-#ifdef __mirmincE_arch_i386
-/* reset -mrtd but keep regparm */
-#define mirmince_cc_syscall	mirmince_cc_cdecl mirmince_cc_regparm(3)
-#endif
-
-#endif
diff --git a/osdep/linux/i386/asm.h b/osdep/linux/i386/asm.h
index ab926c5..51427f2 100644
--- a/osdep/linux/i386/asm.h
+++ b/osdep/linux/i386/asm.h
@@ -17,4 +17,6 @@
 		jmp	_mince_syscallEx;	\
 	END(cname)
 
+#define MIRMINCE_UT_MODE_T	mirmince_u16
+
 #endif
diff --git a/osdep/linux/i386/c.h b/osdep/linux/i386/c.h
deleted file mode 100644
index 4778940..0000000
--- a/osdep/linux/i386/c.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef MIRMINCE_OSDEP_LINUX_I386_C_H
-#define MIRMINCE_OSDEP_LINUX_I386_C_H
-
-#define MIRMINCE_UT_MODE_T	mirmince_u16
-
-#endif
diff --git a/osdep/mirbsd/asm.h b/osdep/mirbsd/asm.h
index 11498d0..9ec8681 100644
--- a/osdep/mirbsd/asm.h
+++ b/osdep/mirbsd/asm.h
@@ -18,4 +18,6 @@
 #define SYSCALL5D		SYSCALLD
 #define SYSCALL6D		SYSCALLD
 
+#define MIRMINCE_UT_MODE_T	mirmince_u32
+
 #endif
diff --git a/osdep/mirbsd/c.h b/osdep/mirbsd/c.h
deleted file mode 100644
index 45ec6d9..0000000
--- a/osdep/mirbsd/c.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef MIRMINCE_OSDEP_MIRBSD_C_H
-#define MIRMINCE_OSDEP_MIRBSD_C_H
-
-#define MIRMINCE_UT_MODE_T	mirmince_u32
-
-#endif
diff --git a/osdep/mirbsd/i386/c.h b/osdep/mirbsd/i386/c.h
deleted file mode 100644
index 784aa88..0000000
--- a/osdep/mirbsd/i386/c.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef MIRMINCE_OSDEP_MIRBSD_I386_C_H
-#define MIRMINCE_OSDEP_MIRBSD_I386_C_H
-
-#endif


hooks/post-receive
-- 
Main git repository for FreeWRT project mirmince
(FreeWRT project mirmince repository mirmince)


More information about the mirmince-commits mailing list