Commit 5229ba66 authored by Bernhard Link's avatar Bernhard Link

Import gv_3.7.2.90.orig.tar.gz

parents 01e9c934 b01fe4c7
2011-08-16 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/misc.c: Revert "Fix Debian bug #594991: unexpected scrolling of the TOC widget"
2011-08-04 Bernhard R. Link <brlink@debian.org>
* src/ps.c(dsc_strncmp): avoid unnecessary temporary string copy
* src/ps.c: reduce the number of sec_sscanf invocations
2011-08-03 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/ps.c (whole file): Fix calls of sec_sscanf having %s in format.
2011-08-01 Bernhard R. Link <brlink@debian.org>
* src/Ghostview.c, src/error.h: do not define errno, as it might be a macro already.
* src/doc_misc.c, src/misc.c, src/ps.c, src/ps.h: make numpages and nummedia signed to avoid warnings
* src/*: get rid of core K&R, use gnulib's _GL_UNUSED and avoid some signed/unsigned
2011-07-12 Bernhard R. Link <brlink@debian.org>
* src/ps.c: handling dsc parse errors: fix FILE given to unlink, check for file open error
2011-05-06 Bernhard R. Link <brlink@debian.org>
* configure.ac, src/Makefile.am: Only install files gv actually reads.
2011-05-05 Markus Steinborn <gnugv_maintainer@yahoo.de>
* m4/* lib/* imported signal from gnulib.
Note: I ran "sed -i 's/<config.h>/<ac_config.h>/g' lib/*" after the
import.
I imported from revision 9dba31e113c15a07103d04980a8f39bcba5f7795
of gnulib.
2011-05-04 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/callbacks.c(cb_presentation): Drop typedef sighandler_t again,
gnulib update (see 2011-05-05) will do the job.
2011-05-04 Bernhard R. Link <brlink@debian.org>
* src/Makefile.am: Improved dependencies and minor improvements.
* src/gv-i18n.pl: Use src/nls/LANGUAGES for getting list of translations
available.
2011-05-02 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/callbacks.c(cb_presentation): Renamed typedef sighandler_t to
mysighandler_t (incomplete).
2011-04-29 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/callbacks.c(cb_presentation): Readd typedef sighandler_t.
2011-04-29 Markus Steinborn <gnugv_maintainer@yahoo.de>
* configure.ac, src/versionp.h: Bumped version to 3.7.2.90
2011-04-29 Markus Steinborn <gnugv_maintainer@yahoo.de>
* configure.ac, src/versionp.h: Bumped version to 3.7.2
......
This diff is collapsed.
......@@ -9,6 +9,10 @@ by a '#' or a '*' or a '?'. A
'#' denotes a change which is noticeable by the user.
'?' describes a known problem which is not fixed yet.
%%%%%%%%%%%%%%%%%%% GV 3.7.2.90 (October 2011) %%%%%%%%%%%%%%%%%%%%%%%%%%
# Various bug fixes.
%%%%%%%%%%%%%%%%%%% GV 3.7.2 (April 2011) %%%%%%%%%%%%%%%%%%%%%%%%%%
# Minor bugfix
......
......@@ -64,7 +64,7 @@ used instead of GNU gv's own strings.
See my job discription on http://sv.gnu.org/projects/gv for details.
I'll check if they are syntactically correct and copy them to "src/nls" in the
distribution tarball of GNU gv.
distribution tarball of GNU gv and update the src/nls/LANGUAGES file.
......@@ -76,9 +76,10 @@ distribution tarball of GNU gv.
(A) What to do of more locales share the same translation strings?
src/nls/LANGUAGES can contain aliases for languages.
Assume "de_CH.utf8" uses the same translation strings as "de_AT.utf8".
"echo de_AT.utf8 > de_CH.utf8.lnk" will create a translation file for
"de_CH.utf8" that tells GNU gv to use the strings from the locale "de_AT.utf8".
"echo 'de_AT.utf8 -> de_CH.utf8' >> LANGUAGES" tells GNU gv to use the
strings from the locale "de_AT.utf8" for the locale "de_CH.utf8".
......
......@@ -1004,7 +1004,6 @@ AC_SUBST([am__untar])
m4_include([m4/00gnulib.m4])
m4_include([m4/alloca.m4])
m4_include([m4/canonicalize.m4])
m4_include([m4/dos.m4])
m4_include([m4/double-slash-root.m4])
m4_include([m4/eealloc.m4])
m4_include([m4/errno_h.m4])
......@@ -1025,6 +1024,7 @@ m4_include([m4/multiarch.m4])
m4_include([m4/onceonly.m4])
m4_include([m4/pathmax.m4])
m4_include([m4/readlink.m4])
m4_include([m4/signal_h.m4])
m4_include([m4/stat.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stddef_h.m4])
......@@ -1036,6 +1036,4 @@ m4_include([m4/tempname.m4])
m4_include([m4/time_h.m4])
m4_include([m4/unistd_h.m4])
m4_include([m4/warn-on-use.m4])
m4_include([m4/wchar_h.m4])
m4_include([m4/wchar_t.m4])
m4_include([m4/wint_t.m4])
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
......@@ -9,7 +9,7 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
......
/* C++ compatible function declaration macros.
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2010-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
......@@ -9,7 +9,7 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,14 +8,14 @@ dnl Please process this file with `autoconf' to get a configure script
AC_INIT(src/ps.c)
AM_INIT_AUTOMAKE(gv,3.7.2)
AM_INIT_AUTOMAKE(gv,3.7.2.90)
AM_CONFIG_HEADER(src/ac_config.h)
dnl AM_CONFIG_HEADER(src/ac_config.h)
AM_MAINTAINER_MODE
dnl gv version
VERSION=3.7.2
VERSION=3.7.2.90
dnl manual edition
MANUALEDITION=First
......@@ -206,6 +206,7 @@ dnl USE_FALLBACK_STYLES=-DUSE_FALLBACK_STYLES
AC_DEFINE(USE_FALLBACK_STYLES,[],[Define USE_FALLBACK_STYLES])
}
AM_CONDITIONAL(ENABLE_FALLBACK_STYLES, test x$opt_fallback_styles = xyes)
AC_ARG_ENABLE(memmove-code, AC_HELP_STRING([--enable-memmove-code],[Use gv's own memmove. It defaults to `yes']), opt_memmove_code=$enableval, opt_memmove_code=yes)
......
This diff is collapsed.
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH GV "1" "April 2011" "gv 3.7.2" "User Commands"
.TH GV "1" "October 2011" "gv 3.7.2.90" "User Commands"
.SH NAME
gv \- Postscript and PDF viewer
.SH SYNOPSIS
......
No preview for this file type
@set UPDATED 16 September 2010
@set UPDATED-MONTH September 2010
@set EDITION 3.7.2
@set VERSION 3.7.2
@set EDITION 3.7.2.90
@set VERSION 3.7.2.90
@set UPDATED 16 September 2010
@set UPDATED-MONTH September 2010
@set EDITION 3.7.2
@set VERSION 3.7.2
@set EDITION 3.7.2.90
@set VERSION 3.7.2.90
This diff is collapsed.
This diff is collapsed.
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
......
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2010 Free Software Foundation, Inc.
Copyright (C) 1996-2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
......@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
# define _GL_USE_STDLIB_ALLOC 1
# include <ac_config.h>
#endif
......@@ -51,6 +52,12 @@
# include "pathmax.h"
# include "malloca.h"
# if HAVE_GETCWD
# if IN_RELOCWRAPPER
/* When building the relocatable program wrapper, use the system's getcwd
function, not the gnulib override, otherwise we would get a link error.
*/
# undef getcwd
# endif
# ifdef VMS
/* We want the directory in Unix syntax, not in VMS syntax. */
# define __getcwd(buf, max) getcwd (buf, max, 0)
......
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
From Paul Eggert and Jim Meyering. */
#ifndef _DOSNAME_H
#define _DOSNAME_H
#if (defined _WIN32 || defined __WIN32__ || \
defined __MSDOS__ || defined __CYGWIN__ || \
defined __EMX__ || defined __DJGPP__)
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \
<= 'z' - 'a')
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
(_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
# ifndef __CYGWIN__
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
# endif
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# define ISSLASH(C) ((C) == '/')
#endif
#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
#endif
#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# else
# define IS_ABSOLUTE_FILE_NAME(F) \
(ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
#endif
#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
#endif /* DOSNAME_H_ */
/* A POSIX-like <errno.h>.
Copyright (C) 2008-2010 Free Software Foundation, Inc.
Copyright (C) 2008-2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -21,6 +21,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
......@@ -98,6 +99,7 @@
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
Likewise, on NonStop Kernel, EDQUOT is not defined.
Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
......@@ -150,6 +152,11 @@
# define GNULIB_defined_ESTALE 1
# endif
# ifndef EDQUOT
# define EDQUOT 2010
# define GNULIB_defined_EDQUOT 1
# endif
# ifndef ECANCELED
# define ECANCELED 2008
# define GNULIB_defined_ECANCELED 1
......
......@@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2010 Free Software
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2010 Free Software
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -21,6 +21,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. We must
also inform the replacement unistd.h to not recursively use
......@@ -180,6 +181,7 @@ extern int optopt;
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
# if !GNULIB_defined_struct_option
struct option
{
const char *name;
......@@ -189,6 +191,8 @@ struct option
int *flag;
int val;
};
# define GNULIB_defined_struct_option 1
# endif
/* Names for the values of the `has_arg' field of `struct option'. */
......
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
1998, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
......
/* Internal declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2010 Free Software
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -108,7 +108,7 @@ struct _getopt_data
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
# endif
#endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their
......
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
......@@ -54,7 +54,7 @@
it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include <cstdlib>
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
# include <libintl.h>
# endif
#endif
......@@ -93,6 +93,12 @@
#endif
/* Prefer gnulib's setlocale override over libintl's setlocale override. */
#ifdef GNULIB_defined_setlocale
# undef setlocale
# define setlocale rpl_setlocale
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
......
/* Provide gettimeofday for systems that don't have it or for which it's broken.
Copyright (C) 2001-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -40,10 +40,10 @@
static struct tm tm_zero_buffer;
static struct tm *localtime_buffer_addr = &tm_zero_buffer;
#undef localtime
# undef localtime
extern struct tm *localtime (time_t const *);
#undef gmtime
# undef gmtime
extern struct tm *gmtime (time_t const *);
/* This is a wrapper for localtime. It is used only on systems for which
......@@ -79,7 +79,7 @@ rpl_gmtime (time_t const *timep)
#if TZSET_CLOBBERS_LOCALTIME
#undef tzset
# undef tzset
extern void tzset (void);
/* This is a wrapper for tzset, for systems on which tzset may clobber
......
/* Copyright (C) 2006-2010 Free Software Foundation, Inc.
/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
......@@ -23,6 +23,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* Include the original <inttypes.h> if it exists, and if this file
has not been included yet or if this file includes gnulib stdint.h
......@@ -1059,7 +1060,10 @@ _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
#if @GNULIB_IMAXDIV@
# if !@HAVE_DECL_IMAXDIV@
# if !GNULIB_defined_imaxdiv_t
typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
# define GNULIB_defined_imaxdiv_t 1
# endif
extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
# endif
#elif defined GNULIB_POSIXCHECK
......@@ -1072,6 +1076,7 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
#if @GNULIB_STRTOIMAX@
# if !@HAVE_DECL_STRTOIMAX@
# undef strtoimax
extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
......@@ -1084,6 +1089,7 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
#if @GNULIB_STRTOUMAX@
# if !@HAVE_DECL_STRTOUMAX@
# undef strtoumax
extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
......
/* Work around a bug of lstat on some systems
Copyright (C) 1997-2006, 2008-2010 Free Software Foundation, Inc.
Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
/* Safe automatic memory allocation.
Copyright (C) 2003, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
......@@ -16,11 +16,14 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#define _GL_USE_STDLIB_ALLOC 1
#include <ac_config.h>
/* Specification. */
#include "malloca.h"
#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
mmalloca() and freea() in the other case are not critical, because they
......@@ -50,8 +53,7 @@ struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
#define HEADER_SIZE \
(((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
/* Verify that HEADER_SIZE == sizeof (struct header). */
typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1];
verify (HEADER_SIZE == sizeof (struct header));
/* We make the hash table quite big, so that during lookups the probability
of empty hash buckets is quite high. There is no need to make the hash
table resizable, because when the hash table gets filled so much that the
......
/* Safe automatic memory allocation.
Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
......
/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2010 Free Software
/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......
/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2010 Free Software
/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2011 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
......@@ -38,7 +38,11 @@
/* Generate a unique temporary file name from XTEMPLATE.
The last six characters of XTEMPLATE must be "XXXXXX";
they are replaced with a string that makes the file name unique.
Then open the file and return a fd. */
Then open the file and return a fd.
If you are creating temporary files which will later be removed,
consider using the clean-temp module, which avoids several pitfalls
of using mkstemp directly. */
int
mkstemp (char *xtemplate)
{
......
/* Define PATH_MAX somehow. Requires sys/types.h.
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2010 Free Software
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
......
/* Stub for readlink().
Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
This diff is collapsed.
/* Work around platform bugs in stat.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -37,6 +37,7 @@ orig_stat (const char *filename, struct stat *buf)
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include "dosname.h"
/* Store information about NAME into ST. Work around bugs with
trailing slashes. Mingw has other bugs (such as st_ino always
......
/* Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
......
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#if defined __need_wchar_t || defined __need_size_t \
|| defined __need_ptrdiff_t || defined __need_NULL \
......
/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
......@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* When including a system file that in turn includes <inttypes.h>,
use the system <inttypes.h>, not our substitute. This avoids
......@@ -107,6 +108,8 @@
warnings in the signed case. */ \
((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types
/* 7.18.1.1. Exact-width integer types */
/* Here we assume a standard architecture where the hardware integer
......@@ -133,40 +136,54 @@ typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t
/* If the system defines INT64_MAX, assume int64_t works. That way,
if the underlying platform defines int64_t to be a 64-bit long long
int, the code below won't mistakenly define it to be a 64-bit long
int, which would mess up C++ name mangling. We must use #ifdef
rather than #if, to avoid an error with HP-UX 10.20 cc. */
#ifdef INT64_MAX
# define GL_INT64_T
#else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
#if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
# if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
typedef long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
#elif defined _MSC_VER
# undef int64_t
# define int64_t gl_int64_t
# define GL_INT64_T
# elif defined _MSC_VER
# undef int64_t
typedef __int64 gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
#elif @HAVE_LONG_LONG_INT@
# undef int64_t
# define int64_t gl_int64_t
# define GL_INT64_T
# elif @HAVE_LONG_LONG_INT@
# undef int64_t
typedef long long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
# define int64_t gl_int64_t
# define GL_INT64_T
# endif
#endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
typedef unsigned long int gl_uint64_t;
# define uint64_t gl_uint64_t
#ifdef UINT64_MAX
# define GL_UINT64_T
#elif defined _MSC_VER
# undef uint64_t
#else
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
typedef unsigned long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif defined _MSC_VER
# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
#elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
typedef unsigned long long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# endif
#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
......@@ -278,7 +295,11 @@ typedef unsigned long int gl_uintmax_t;
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
to be found in the autoconf macros. */
typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
? 1 : -1];
#define GNULIB_defined_stdint_types 1
#endif /* !GNULIB_defined_stdint_types */