Changeset 4686 for libcaca


Ignore:
Timestamp:
Oct 9, 2010, 11:43:25 AM (8 years ago)
Author:
Sam Hocevar
Message:

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

Location:
libcaca/trunk
Files:
1 deleted
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/.gitignore

    r4220 r4686  
    2525INSTALL
    2626caca-config
    27 # libcaca binaries
    28 caca/caca_types.h
    2927# caca-sharp binaries
    3028caca-sharp/*.dll
  • libcaca/trunk/caca/Makefile.am

    r4680 r4686  
    11
    2 EXTRA_DIST = caca_types.h.in caca.pc.in \
     2EXTRA_DIST = caca.pc.in \
    33             mono9.data monobold12.data \
    44             libcaca.vcproj libcaca.def
    5 DISTCLEANFILES = caca_types.h caca.pc
     5DISTCLEANFILES = caca.pc
    66
    77AM_CPPFLAGS = -I$(top_srcdir) -DPLUGINDIR=\"$(plugindir)\"
  • libcaca/trunk/caca/caca_types.h

    • Property svn:keywords set to Id
    r4680 r4686  
    11/*
    2  *  libcaca       Colour ASCII-Art library
    32 *  libcaca       Colour ASCII-Art library
    43 *  Copyright (c) 2008-2010 Sam Hocevar <sam@hocevar.net>
     
    1918#define __CACA_TYPES_H__
    2019
    21 #ifndef CACA_TYPES
    22 #   define CACA_TYPES @CACA_TYPES@
    23 #endif
    24 
    25 /* mode 1: standard <stdint.h> header is present, just include it */
    26 #if CACA_TYPES == 1
     20#if !defined _MSC_VER
     21    /* FIXME: we should detect platforms with <inttypes.h> and no <stdint.h> */
    2722#   include <stdint.h>
    2823#   include <unistd.h>
    29 
    30 /* mode 2: standard <inttypes.h> header is present, just include it */
    31 #elif CACA_TYPES == 2
    32 #   include <inttypes.h>
    33 #   include <unistd.h>
    34 
    35 /* mode 3: Win32, only (u)intptr_t is present */
    36 #elif CACA_TYPES == 3
    37 #include <windows.h>
    38 
    39 typedef signed char int8_t;
    40 typedef signed short int16_t;
    41 typedef signed int int32_t;
    42 typedef signed long long int int64_t;
    43 
    44 typedef unsigned char uint8_t;
    45 typedef unsigned short uint16_t;
    46 typedef unsigned int uint32_t;
    47 typedef unsigned long long int uint64_t;
    48 
    49 typedef int ssize_t;
    50 typedef unsigned int size_t;
    51 
    52 /* mode 4: Win64, only (u)intptr_t and size_t are present */
    53 #elif CACA_TYPES == 4
    54 #include <windows.h>
    55 
    56 typedef signed char int8_t;
    57 typedef signed short int16_t;
    58 typedef signed int int32_t;
    59 typedef signed long long int int64_t;
    60 
    61 typedef unsigned char uint8_t;
    62 typedef unsigned short uint16_t;
    63 typedef unsigned int uint32_t;
    64 typedef unsigned long long int uint64_t;
    65 
    66 typedef int ssize_t;
     24#else
     25#   if _MSC_VER >= 1600
     26        /* Visual Studio 2010 and later */
     27#       include <stdint.h>
     28#   else
     29#       include <windows.h>
     30#       if _MSC_VER >= 1300
     31            typedef signed __int8 int8_t;
     32            typedef signed __int16 int16_t;
     33            typedef signed __int32 int32_t;
     34            typedef signed __int64 int64_t;
     35            typedef unsigned __int8 uint8_t;
     36            typedef unsigned __int16 uint16_t;
     37            typedef unsigned __int32 uint32_t;
     38            typedef unsigned __int64 uint64_t;
     39#       else
     40            typedef signed char int8_t;
     41            typedef signed short int16_t;
     42            typedef signed int int32_t;
     43            typedef signed long long int int64_t;
     44            typedef unsigned char uint8_t;
     45            typedef unsigned short uint16_t;
     46            typedef unsigned int uint32_t;
     47            typedef unsigned long long int uint64_t;
     48#       endif
     49#       if defined _WIN64
     50            /* Win64, only (u)intptr_t and size_t are present */
     51            typedef int ssize_t;
     52#       else
     53            /* Win32, only (u)intptr_t is present */
     54            typedef int ssize_t;
     55            typedef unsigned int size_t;
     56#       endif
     57#   endif
     58#endif
    6759
    6860/* fallback: nothing is known, we assume the platform is 32-bit and
    6961 * sizeof(long) == sizeof(void *). We don't typedef directly because we
    7062 * have no idea what other typedefs have already been made. */
    71 #else
     63#if 0
    7264typedef signed char _caca_int8_t;
    7365typedef signed short _caca_int16_t;
     
    8274#   undef int64_t
    8375#   define int64_t _caca_int64_t
    84 
    8576typedef unsigned char _caca_uint8_t;
    8677typedef unsigned short _caca_uint16_t;
     
    9586#   undef uint64_t
    9687#   define uint64_t _caca_uint64_t
    97 
    9888typedef long int _caca_intptr_t;
    9989typedef unsigned long int _caca_uintptr_t;
     
    10292#   undef uintptr_t
    10393#   define uintptr_t _caca_uintptr_t
    104 
    10594typedef int _caca_ssize_t;
    10695typedef unsigned int _caca_size_t;
     
    10998#   undef size_t
    11099#   define size_t _caca_size_t
    111 
    112100#endif
    113101
    114102#endif /* __CACA_TYPES_H__ */
     103
  • libcaca/trunk/caca/libcaca.vcproj

    r4677 r4686  
    422422                </File>
    423423                <File
    424                         RelativePath="..\win32\caca_types.h"
     424                        RelativePath="caca_types.h"
    425425                        >
    426426                </File>
  • libcaca/trunk/configure.ac

    r4679 r4686  
    370370AC_SUBST(GL_LIBS)
    371371
    372 # How to get the C99 types. See caca/caca_types.h.in for details about
    373 # the CACA_TYPES variable
    374 if test "${ac_cv_my_have_kernel}" = "yes"; then
    375   CACA_TYPES=0
    376 else
    377   AC_CHECK_HEADERS(stdint.h,
    378     [CACA_TYPES=1],
    379     [AC_CHECK_HEADERS(inttypes.h,
    380       [CACA_TYPES=2],
    381       [AC_CHECK_HEADERS(windows.h,
    382         [CACA_TYPES=3],
    383         [CACA_TYPES=0])])])
    384 fi
    385 AC_SUBST(CACA_TYPES)
    386 
    387372# Optimizations
    388373CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
     
    580565])
    581566AC_CONFIG_FILES([
    582   caca/caca_types.h
    583567  caca/caca.pc
    584568  caca-sharp/caca-sharp.dll.config
  • libcaca/trunk/win32/Makefile.am

    r4333 r4686  
    11
    2 EXTRA_DIST = config.h caca_types.h
     2EXTRA_DIST = config.h
    33
Note: See TracChangeset for help on using the changeset viewer.