Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15abc77

Browse files
committed
More correct way to check for existence of types, which allows to specify
which include files to consider. Should fix BeOS problems with int8 types.
1 parentad81c99 commit15abc77

File tree

6 files changed

+181
-144
lines changed

6 files changed

+181
-144
lines changed

‎config/c-compiler.m4

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros to detect C compiler features
2-
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.3 2000/08/29 09:36:37 petere Exp $
2+
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.4 2001/12/02 11:38:40 petere Exp $
33

44

55
# PGAC_C_SIGNED
@@ -117,3 +117,34 @@ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The alignment requirement of a `]
117117
undefine([AC_TYPE_NAME])dnl
118118
undefine([AC_CV_NAME])dnl
119119
])# PGAC_CHECK_ALIGNOF
120+
121+
122+
# PGAC_CHECK_TYPE(TYPE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [INCLUDES])
123+
# ---------------------------------------------------------------------------
124+
125+
AC_DEFUN([PGAC_CHECK_TYPE],
126+
[changequote(<<,>>)dnl
127+
dnl The name to #define
128+
define(<<AC_TYPE_NAME>>,translit(have_$1,[a-z *],[A-Z_P]))dnl
129+
dnl The cache variable name.
130+
define(<<AC_CV_NAME>>,translit(pgac_cv_have_$1,[ *],[_p]))dnl
131+
changequote([,])dnl
132+
AC_CACHE_CHECK([for$1],AC_CV_NAME,
133+
[AC_TRY_COMPILE([$4],
134+
[if (($1 *) 0)
135+
return 0;
136+
if (sizeof ($1))
137+
return 0;],
138+
AC_CV_NAME[=yes],
139+
AC_CV_NAME[=no])])
140+
if test "$AC_CV_NAME" = yes; then
141+
AC_DEFINE(AC_TYPE_NAME,1,[Define to 1 if you have `]$1['])
142+
ifelse($2,,,[$2
143+
])[]dnl
144+
ifelse($3,,,[else
145+
$3
146+
])[]dnl
147+
fi
148+
undefine([AC_TYPE_NAME])dnl
149+
undefine([AC_CV_NAME])dnl
150+
])# PGAC_CHECK_TYPE

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp