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_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_HEADER_STDC
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 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
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
*/
|
||||
|
||||
#if defined LINUX
|
||||
#include <embryo_cc_sclinux.h>
|
||||
#include "embryo_cc_osdefs.h"
|
||||
#include "embryo_cc_sclinux.h"
|
||||
#endif
|
||||
|
||||
#ifndef __AMX_H
|
||||
|
@ -32,18 +33,11 @@
|
|||
/* The ISO C99 defines the int16_t and int_32t types. If the compiler got
|
||||
* here, these types are probably undefined.
|
||||
*/
|
||||
#if defined __LCC__ || defined LINUX
|
||||
#include <stdint.h>
|
||||
#else
|
||||
# ifndef __uint32_t_defined
|
||||
typedef short int int16_t;
|
||||
typedef unsigned short int uint16_t;
|
||||
#if defined SN_TARGET_PS2
|
||||
typedef int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
typedef long int int32_t;
|
||||
typedef unsigned long int uint32_t;
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#endif
|
||||
|
||||
#if defined LINUX
|
||||
#include <endian.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/* Linux NOW has these */
|
||||
|
@ -48,13 +48,13 @@
|
|||
#endif
|
||||
|
||||
/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
|
||||
#if !defined BYTE_ORDER
|
||||
#if defined UCLINUX
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# undef BYTE_ORDER
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
# undef BYTE_ORDER
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* _MAX_PATH is sometimes called differently and it may be in limits.h instead
|
||||
* stdio.h.
|
||||
|
|
|
@ -37,10 +37,8 @@
|
|||
|
||||
#if defined LINUX
|
||||
#include <unistd.h>
|
||||
#include "embryo_cc_osdefs.h"
|
||||
#include <embryo_cc_sclinux.h>
|
||||
//
|
||||
#include "config.h"
|
||||
//
|
||||
#endif
|
||||
|
||||
#if defined FORTIFY
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include "embryo_cc_osdefs.h"
|
||||
#include "embryo_cc_sc.h"
|
||||
#if defined LINUX
|
||||
#include <embryo_cc_sclinux.h>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#if defined LINUX
|
||||
# include "embryo_cc_osdefs.h"
|
||||
# include <embryo_cc_sclinux.h>
|
||||
#endif
|
||||
#if defined FORTIFY
|
||||
|
|
|
@ -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
|
||||
* 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 stricmp(a,b) strcasecmp(a,b)
|
||||
#define strnicmp(a,b,c) strncasecmp(a,b,c)
|
||||
|
@ -35,9 +56,13 @@
|
|||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined __OpenBSD__
|
||||
#ifndef __BYTE_ORDER
|
||||
# define __BYTE_ORDER BYTE_ORDER
|
||||
#endif
|
||||
#ifndef __LITTLE_ENDIAN
|
||||
# define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#endif
|
||||
#ifndef __BIG_ENDIAN
|
||||
# define __BIG_ENDIAN BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
|
|
|
@ -215,7 +215,6 @@ main(int argc,char *argv[])
|
|||
{
|
||||
for (i = args; i < argc; i++)
|
||||
{
|
||||
printf("%i\n", i);
|
||||
if (argv[i][0] == 's')
|
||||
embryo_parameter_string_push(ep, argv[i] + 1);
|
||||
else if (argv[i][0] == 'i')
|
||||
|
|
|
@ -7,6 +7,8 @@ MAINTAINERCLEANFILES = Makefile.in
|
|||
|
||||
LDFLAGS =
|
||||
INCLUDES = -I. \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/lib/include
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _EMBRYO_PRIVATE_H
|
||||
|
||||
#include "Embryo.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
Loading…
Reference in New Issue