forked from enlightenment/efl
portable portable damnit! need help cleaning this code! its horrid!
SVN revision: 9452
This commit is contained in:
parent
0e711afd54
commit
6685ca7a70
|
@ -11,6 +11,7 @@ AC_ISC_POSIX
|
||||||
AM_INIT_AUTOMAKE(embryo, 0.0.1)
|
AM_INIT_AUTOMAKE(embryo, 0.0.1)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
|
AC_C_BIGENDIAN
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_STDC
|
AM_PROG_CC_STDC
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
INCLUDES = -DLINUX -I$(top_srcdir)/src/lib
|
INCLUDES = -DLINUX -I$(top_srcdir)/src/lib -I$(top_srcdir) -I$(top_builddir)
|
||||||
|
|
||||||
bin_PROGRAMS = embryo embryo_cc
|
bin_PROGRAMS = embryo embryo_cc
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined LINUX
|
#if defined LINUX
|
||||||
#include <embryo_cc_sclinux.h>
|
#include "embryo_cc_osdefs.h"
|
||||||
|
#include "embryo_cc_sclinux.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __AMX_H
|
#ifndef __AMX_H
|
||||||
|
@ -32,19 +33,12 @@
|
||||||
/* The ISO C99 defines the int16_t and int_32t types. If the compiler got
|
/* The ISO C99 defines the int16_t and int_32t types. If the compiler got
|
||||||
* here, these types are probably undefined.
|
* here, these types are probably undefined.
|
||||||
*/
|
*/
|
||||||
#if defined __LCC__ || defined LINUX
|
# ifndef __uint32_t_defined
|
||||||
#include <stdint.h>
|
typedef short int int16_t;
|
||||||
#else
|
typedef unsigned short int uint16_t;
|
||||||
typedef short int int16_t;
|
typedef int int32_t;
|
||||||
typedef unsigned short int uint16_t;
|
typedef unsigned int uint32_t;
|
||||||
#if defined SN_TARGET_PS2
|
# endif
|
||||||
typedef int int32_t;
|
|
||||||
typedef unsigned int uint32_t;
|
|
||||||
#else
|
|
||||||
typedef long int int32_t;
|
|
||||||
typedef unsigned long int uint32_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32 || defined __MSDOS__
|
#if defined __WIN32__ || defined _WIN32 || defined WIN32 || defined __MSDOS__
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined LINUX
|
#if defined LINUX
|
||||||
#include <endian.h>
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Linux NOW has these */
|
/* Linux NOW has these */
|
||||||
|
@ -48,12 +48,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
|
/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
|
||||||
#if !defined BYTE_ORDER
|
#ifdef WORDS_BIGENDIAN
|
||||||
#if defined UCLINUX
|
# undef BYTE_ORDER
|
||||||
#define BYTE_ORDER BIG_ENDIAN
|
# define BYTE_ORDER BIG_ENDIAN
|
||||||
#else
|
#else
|
||||||
#define BYTE_ORDER LITTLE_ENDIAN
|
# undef BYTE_ORDER
|
||||||
#endif
|
# define BYTE_ORDER LITTLE_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* _MAX_PATH is sometimes called differently and it may be in limits.h instead
|
/* _MAX_PATH is sometimes called differently and it may be in limits.h instead
|
||||||
|
|
|
@ -37,10 +37,8 @@
|
||||||
|
|
||||||
#if defined LINUX
|
#if defined LINUX
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "embryo_cc_osdefs.h"
|
||||||
#include <embryo_cc_sclinux.h>
|
#include <embryo_cc_sclinux.h>
|
||||||
//
|
|
||||||
#include "config.h"
|
|
||||||
//
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined FORTIFY
|
#if defined FORTIFY
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include "embryo_cc_osdefs.h"
|
||||||
#include "embryo_cc_sc.h"
|
#include "embryo_cc_sc.h"
|
||||||
#if defined LINUX
|
#if defined LINUX
|
||||||
#include <embryo_cc_sclinux.h>
|
#include <embryo_cc_sclinux.h>
|
||||||
|
|
|
@ -26,10 +26,11 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#if defined LINUX
|
#if defined LINUX
|
||||||
#include <embryo_cc_sclinux.h>
|
# include "embryo_cc_osdefs.h"
|
||||||
|
# include <embryo_cc_sclinux.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined FORTIFY
|
#if defined FORTIFY
|
||||||
#include "fortify.h"
|
# include "fortify.h"
|
||||||
#endif
|
#endif
|
||||||
#include "embryo_cc_sc.h"
|
#include "embryo_cc_sc.h"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,27 @@
|
||||||
* So we stick to getchar at the moment... (one needs to key ctrl-d to terminate input if getch is called with a controlling
|
* So we stick to getchar at the moment... (one needs to key ctrl-d to terminate input if getch is called with a controlling
|
||||||
* terminal driven by a tty having -raw)
|
* terminal driven by a tty having -raw)
|
||||||
*/
|
*/
|
||||||
|
#if defined LINUX
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Linux NOW has these */
|
||||||
|
#if !defined BIG_ENDIAN
|
||||||
|
#define BIG_ENDIAN 4321
|
||||||
|
#endif
|
||||||
|
#if !defined LITTLE_ENDIAN
|
||||||
|
#define LITTLE_ENDIAN 1234
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
|
||||||
|
#ifdef WORDS_BIGENDIAN
|
||||||
|
# undef BYTE_ORDER
|
||||||
|
# define BYTE_ORDER BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
# undef BYTE_ORDER
|
||||||
|
# define BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#define getch getchar
|
#define getch getchar
|
||||||
#define stricmp(a,b) strcasecmp(a,b)
|
#define stricmp(a,b) strcasecmp(a,b)
|
||||||
#define strnicmp(a,b,c) strncasecmp(a,b,c)
|
#define strnicmp(a,b,c) strncasecmp(a,b,c)
|
||||||
|
@ -35,9 +56,13 @@
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __OpenBSD__
|
#ifndef __BYTE_ORDER
|
||||||
# define __BYTE_ORDER BYTE_ORDER
|
# define __BYTE_ORDER BYTE_ORDER
|
||||||
|
#endif
|
||||||
|
#ifndef __LITTLE_ENDIAN
|
||||||
# define __LITTLE_ENDIAN LITTLE_ENDIAN
|
# define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||||
|
#endif
|
||||||
|
#ifndef __BIG_ENDIAN
|
||||||
# define __BIG_ENDIAN BIG_ENDIAN
|
# define __BIG_ENDIAN BIG_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,6 @@ main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
for (i = args; i < argc; i++)
|
for (i = args; i < argc; i++)
|
||||||
{
|
{
|
||||||
printf("%i\n", i);
|
|
||||||
if (argv[i][0] == 's')
|
if (argv[i][0] == 's')
|
||||||
embryo_parameter_string_push(ep, argv[i] + 1);
|
embryo_parameter_string_push(ep, argv[i] + 1);
|
||||||
else if (argv[i][0] == 'i')
|
else if (argv[i][0] == 'i')
|
||||||
|
|
|
@ -7,6 +7,8 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
INCLUDES = -I. \
|
INCLUDES = -I. \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_builddir) \
|
||||||
-I$(top_srcdir)/src/lib \
|
-I$(top_srcdir)/src/lib \
|
||||||
-I$(top_srcdir)/src/lib/include
|
-I$(top_srcdir)/src/lib/include
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _EMBRYO_PRIVATE_H
|
#define _EMBRYO_PRIVATE_H
|
||||||
|
|
||||||
#include "Embryo.h"
|
#include "Embryo.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
Loading…
Reference in New Issue