Procházet zdrojové kódy

Get rid of the build time generated caca_types.h. It sucked.

tags/v0.99.beta18
Sam Hocevar sam před 14 roky
rodič
revize
c783e868da
7 změnil soubory, kde provedl 43 přidání a 78 odebrání
  1. +0
    -2
      .gitignore
  2. +2
    -2
      caca/Makefile.am
  3. +39
    -50
      caca/caca_types.h
  4. +1
    -1
      caca/libcaca.vcproj
  5. +0
    -16
      configure.ac
  6. +1
    -1
      win32/Makefile.am
  7. +0
    -6
      win32/caca_types.h

+ 0
- 2
.gitignore Zobrazit soubor

@@ -24,8 +24,6 @@ stamp-*
*-stamp
INSTALL
caca-config
# libcaca binaries
caca/caca_types.h
# caca-sharp binaries
caca-sharp/*.dll
caca-sharp/*.config


+ 2
- 2
caca/Makefile.am Zobrazit soubor

@@ -1,8 +1,8 @@

EXTRA_DIST = caca_types.h.in caca.pc.in \
EXTRA_DIST = caca.pc.in \
mono9.data monobold12.data \
libcaca.vcproj libcaca.def
DISTCLEANFILES = caca_types.h caca.pc
DISTCLEANFILES = caca.pc

AM_CPPFLAGS = -I$(top_srcdir) -DPLUGINDIR=\"$(plugindir)\"



caca/caca_types.h.in → caca/caca_types.h Zobrazit soubor

@@ -1,5 +1,4 @@
/*
* libcaca Colour ASCII-Art library
* libcaca Colour ASCII-Art library
* Copyright (c) 2008-2010 Sam Hocevar <sam@hocevar.net>
* All Rights Reserved
@@ -18,57 +17,50 @@
#ifndef __CACA_TYPES_H__
#define __CACA_TYPES_H__

#ifndef CACA_TYPES
# define CACA_TYPES @CACA_TYPES@
#endif

/* mode 1: standard <stdint.h> header is present, just include it */
#if CACA_TYPES == 1
#if !defined _MSC_VER
/* FIXME: we should detect platforms with <inttypes.h> and no <stdint.h> */
# include <stdint.h>
# include <unistd.h>

/* mode 2: standard <inttypes.h> header is present, just include it */
#elif CACA_TYPES == 2
# include <inttypes.h>
# include <unistd.h>

/* mode 3: Win32, only (u)intptr_t is present */
#elif CACA_TYPES == 3
#include <windows.h>

typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int int64_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;

typedef int ssize_t;
typedef unsigned int size_t;

/* mode 4: Win64, only (u)intptr_t and size_t are present */
#elif CACA_TYPES == 4
#include <windows.h>

typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int int64_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;

typedef int ssize_t;
#else
# if _MSC_VER >= 1600
/* Visual Studio 2010 and later */
# include <stdint.h>
# else
# include <windows.h>
# if _MSC_VER >= 1300
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef signed __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
# else
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;
# endif
# if defined _WIN64
/* Win64, only (u)intptr_t and size_t are present */
typedef int ssize_t;
# else
/* Win32, only (u)intptr_t is present */
typedef int ssize_t;
typedef unsigned int size_t;
# endif
# endif
#endif

/* fallback: nothing is known, we assume the platform is 32-bit and
* sizeof(long) == sizeof(void *). We don't typedef directly because we
* have no idea what other typedefs have already been made. */
#else
#if 0
typedef signed char _caca_int8_t;
typedef signed short _caca_int16_t;
typedef signed long int _caca_int32_t;
@@ -81,7 +73,6 @@ typedef signed long long int _caca_int64_t;
# define int32_t _caca_int32_t
# undef int64_t
# define int64_t _caca_int64_t

typedef unsigned char _caca_uint8_t;
typedef unsigned short _caca_uint16_t;
typedef unsigned long int _caca_uint32_t;
@@ -94,21 +85,19 @@ typedef unsigned long long int _caca_uint64_t;
# define uint32_t _caca_uint32_t
# undef uint64_t
# define uint64_t _caca_uint64_t

typedef long int _caca_intptr_t;
typedef unsigned long int _caca_uintptr_t;
# undef intptr_t
# define intptr_t _caca_intptr_t
# undef uintptr_t
# define uintptr_t _caca_uintptr_t

typedef int _caca_ssize_t;
typedef unsigned int _caca_size_t;
# undef ssize_t
# define ssize_t _caca_ssize_t
# undef size_t
# define size_t _caca_size_t

#endif

#endif /* __CACA_TYPES_H__ */


+ 1
- 1
caca/libcaca.vcproj Zobrazit soubor

@@ -421,7 +421,7 @@
>
</File>
<File
RelativePath="..\win32\caca_types.h"
RelativePath="caca_types.h"
>
</File>
<File


+ 0
- 16
configure.ac Zobrazit soubor

@@ -369,21 +369,6 @@ AC_SUBST(X11_LIBS)
AC_SUBST(GL_CFLAGS)
AC_SUBST(GL_LIBS)

# How to get the C99 types. See caca/caca_types.h.in for details about
# the CACA_TYPES variable
if test "${ac_cv_my_have_kernel}" = "yes"; then
CACA_TYPES=0
else
AC_CHECK_HEADERS(stdint.h,
[CACA_TYPES=1],
[AC_CHECK_HEADERS(inttypes.h,
[CACA_TYPES=2],
[AC_CHECK_HEADERS(windows.h,
[CACA_TYPES=3],
[CACA_TYPES=0])])])
fi
AC_SUBST(CACA_TYPES)

# Optimizations
CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
@@ -579,7 +564,6 @@ AC_CONFIG_FILES([
win32/Makefile
])
AC_CONFIG_FILES([
caca/caca_types.h
caca/caca.pc
caca-sharp/caca-sharp.dll.config
cxx/caca++.pc


+ 1
- 1
win32/Makefile.am Zobrazit soubor

@@ -1,3 +1,3 @@

EXTRA_DIST = config.h caca_types.h
EXTRA_DIST = config.h


+ 0
- 6
win32/caca_types.h Zobrazit soubor

@@ -1,6 +0,0 @@
#if defined _WIN64
# define CACA_TYPES 4
#else
# define CACA_TYPES 3
#endif
#include "../caca/caca_types.h.in"

Načítá se…
Zrušit
Uložit