From: Erwin Janssen Date: Wed, 21 Dec 2016 14:15:05 +0000 (+0100) Subject: Remove usage of ast_common.h X-Git-Tag: 2.40.1~2^2~1^2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13c2e28a82e950e322d196514f3ff602de039ab6;p=graphviz Remove usage of ast_common.h Now that ast_common.h is never included anymore, the files `ast_common.h.in`, `windows/include/ast_common.h` and all `features/common` can be removed. --- diff --git a/.gitignore b/.gitignore index 7a3e26980..541b6962a 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ Makefile.in # Files generated by configure /Doxyfile -/ast_common.h /builddate.h /config.cache /config.h diff --git a/ChangeLog b/ChangeLog index 96a1354bb..28d5b60bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +December 21, 2016 + - Remove usage of ast_common.h December 20, 2016 - Release 2.40.0 - network-simplex fixes and optimization (Stephen North) diff --git a/Makefile.am b/Makefile.am index fb212b41f..8f5e51ab7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,7 +37,7 @@ $(top_builddir)/graphviz_version.h: config.h EXTRA_DIST = $(txt) $(html) graphviz.spec.in graphviz.spec \ autogen.sh config/depcomp config/config.rpath \ - builddate.h ast_common.h.in compat.h \ + builddate.h compat.h \ Makeargs iffe config.iffe \ m4/README m4/iconv.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 \ graphviz.7 Doxyfile.in Doxyfile awk \ @@ -61,4 +61,4 @@ pkg: dist tar xzf graphviz-@VERSION@.tar.gz && make -C graphviz-@VERSION@/macosx/build && mv graphviz-@VERSION@/macosx/build/graphviz-*.pkg . -DISTCLEANFILES = config.cache builddate.h ast_common.h FEATURE/* graphviz-@VERSION@* +DISTCLEANFILES = config.cache builddate.h FEATURE/* graphviz-@VERSION@* diff --git a/ast_common.h.in b/ast_common.h.in deleted file mode 100644 index 16f57e67a..000000000 --- a/ast_common.h.in +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _AST_COMMON_H -#define _AST_COMMON_H 1 - -#include "config.h" - -#ifdef HAVE_SYS_TYPES_H -# define _sys_types 1 -#endif - -#ifdef HAVE_SYS_TYPES_H -# define _sys_types 1 -#endif - -#ifdef HAVE_SYS_STAT_H -# define _sys_stat 1 -#endif - -/* FIXME - need proper config test for these */ -#define _typ_ssize_t 1 /* ssize_t is a type */ -/* */ - -#ifndef _AST_STD_H -# if defined(_sys_types) -# include -# endif -#endif -#if !_typ_ssize_t -# define _typ_ssize_t 1 -typedef int ssize_t; -#endif - -#endif /*AST_COMMON_H */ diff --git a/configure.ac b/configure.ac index 0d9faa170..51166c33c 100644 --- a/configure.ac +++ b/configure.ac @@ -217,11 +217,6 @@ AC_CONFIG_HEADERS([config.h]) # put BUILDDATE in its own file so that only targets that use it get rebuilt echo "#define BUILDDATE \"$GRAPHVIZ_VERSION_DATE\"" > builddate.h -# only update ast_common.h (for GNU builds) from master if changed -if ! `cmp -s $srcdir/ast_common.h.in ast_common.h`; then - cp $srcdir/ast_common.h.in ast_common.h; -fi - AC_PREFIX_DEFAULT([/usr/local]) if test "x${prefix}" = "xNONE"; then prefix=${ac_default_prefix} diff --git a/features/common b/features/common deleted file mode 100644 index 4f256c8dc..000000000 --- a/features/common +++ /dev/null @@ -1,77 +0,0 @@ -iff AST_COMMON -hdr pthread -hdr types -sys types -typ size_t,ssize_t -typ long.double - -mac SF_CLOSE sys/socket.h -mac SF_APPEND sys/stat.h - -proto stdc note{ Standard-C prototypes ok }end compile{ - extern int foo(int, int); - bar() - { foo(1, 1); - } -}end - -dll import note{ Microsoft import/export nonsense }end execute{ - __declspec(dllimport) int foo; - main() { return foo == 5 ? 0 : 1; } - int bar = 5; - int* _imp__foo = &bar; -}end - -xopen stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{ - #include - #define Failed(file) (unlink(file),1) - main(int argc, char** argv) - { FILE *f1, *f2; - char file[1024], buf[1024], *f, *t; - int i, fd; - - /* create file */ - for(f = argv[0], t = file; (*t = *f++) != 0; ) - t++; - *t++ = '.'; *t++ = 'D'; *t++ = 0; - if((fd = creat(file,0666)) < 0) - return 1; - - for (i = 0; i < sizeof(buf); ++i) - buf[i] = '0' + (i%10); - for (i = 0; i < 16; ++i) - if (write(fd,buf,sizeof(buf)) != sizeof(buf)) - return Failed(file); - close(fd); - - if(!(f1 = fopen(file,"r+")) || - (fd = dup(fileno(f1))) < 0 || - !(f2 = fdopen(fd,"r+")) ) - return Failed(file); - - if(fread(buf, 1, 7, f2) != 7 || ftell(f2) != 7) - return Failed(file); - - if(fseek(f1, 1010, 0) < 0 || ftell(f1) != 1010) - return Failed(file); - - fflush(f2); /* this should set the seek location to 1010 */ - if(ftell(f2) != 1010) - return Failed(file); - - unlink(file); - return 0; - } -}end - -cat{ - #ifndef _AST_STD_H - # if _sys_types - # include - # endif - #endif - #if !_typ_ssize_t - # define _typ_ssize_t 1 - typedef int ssize_t; - #endif -}end diff --git a/lib/cdt/Makefile.am b/lib/cdt/Makefile.am index 888c5f533..e99b3e1cf 100644 --- a/lib/cdt/Makefile.am +++ b/lib/cdt/Makefile.am @@ -10,7 +10,7 @@ pkgconfigdir = $(libdir)/pkgconfig AM_CPPFLAGS = -I$(top_srcdir) pkginclude_HEADERS = cdt.h -noinst_HEADERS = dthdr.h $(top_builddir)/ast_common.h +noinst_HEADERS = dthdr.h noinst_LTLIBRARIES = libcdt_C.la lib_LTLIBRARIES = libcdt.la man_MANS = cdt.3 diff --git a/lib/sfio/features/common b/lib/sfio/features/common deleted file mode 100644 index 23a1388c3..000000000 --- a/lib/sfio/features/common +++ /dev/null @@ -1,77 +0,0 @@ -iff AST_COMMON -hdr pthread -hdr types -sys types -typ size_t,ssize_t -typ long.double - -mac SF_CLOSE sys/socket.h -mac SF_APPEND sys/stat.h - -proto stdc note{ Standard-C prototypes ok }end compile{ - extern int foo(int, int); - bar() - { foo(1, 1); - } -}end - -dll import note{ Microsoft import/export nonsense }end execute{ - __declspec(dllimport) int foo; - main() { return foo == 5 ? 0 : 1; } - int bar = 5; - int* _imp__foo = &bar; -}end - -xopen stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{ - #include - #define Failed(file) (unlink(file),1) - main(int argc, char** argv) - { FILE *f1, *f2; - char file[1024], buf[1024], *f, *t; - int i, fd; - - /* create file */ - for(f = argv[0], t = file; (*t = *f++) != 0; ) - t++; - *t++ = '.'; *t++ = 'D'; *t++ = 0; - if((fd = creat(file,0666)) < 0) - return 1; - - for (i = 0; i < sizeof(buf); ++i) - buf[i] = '0' + (i%10); - for (i = 0; i < 16; ++i) - if (write(fd,buf,sizeof(buf)) != sizeof(buf)) - return Failed(file); - close(fd); - - if(!(f1 = fopen(file,"r+")) || - (fd = dup(fileno(f1))) < 0 || - !(f2 = fdopen(fd,"r+")) ) - return Failed(file); - - if(fread(buf, 1, 7, f2) != 7 || ftell(f2) != 7) - return Failed(file); - - if(fseek(f1, 1010, 0) < 0 || ftell(f1) != 1010) - return Failed(file); - - fflush(f2); /* this should set the seek location to 1010 */ - if(ftell(f2) != 1010) - return Failed(file); - - unlink(file); - return 0; - } -}end - -cat{ - #ifndef _AST_STD_H - # if _sys_types - # include - # endif - #endif - #if !_typ_ssize_t - # define _typ_ssize_t 1 - typedef int ssize_t; - #endif -}end diff --git a/lib/vmalloc/features/common b/lib/vmalloc/features/common deleted file mode 100644 index 23a1388c3..000000000 --- a/lib/vmalloc/features/common +++ /dev/null @@ -1,77 +0,0 @@ -iff AST_COMMON -hdr pthread -hdr types -sys types -typ size_t,ssize_t -typ long.double - -mac SF_CLOSE sys/socket.h -mac SF_APPEND sys/stat.h - -proto stdc note{ Standard-C prototypes ok }end compile{ - extern int foo(int, int); - bar() - { foo(1, 1); - } -}end - -dll import note{ Microsoft import/export nonsense }end execute{ - __declspec(dllimport) int foo; - main() { return foo == 5 ? 0 : 1; } - int bar = 5; - int* _imp__foo = &bar; -}end - -xopen stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{ - #include - #define Failed(file) (unlink(file),1) - main(int argc, char** argv) - { FILE *f1, *f2; - char file[1024], buf[1024], *f, *t; - int i, fd; - - /* create file */ - for(f = argv[0], t = file; (*t = *f++) != 0; ) - t++; - *t++ = '.'; *t++ = 'D'; *t++ = 0; - if((fd = creat(file,0666)) < 0) - return 1; - - for (i = 0; i < sizeof(buf); ++i) - buf[i] = '0' + (i%10); - for (i = 0; i < 16; ++i) - if (write(fd,buf,sizeof(buf)) != sizeof(buf)) - return Failed(file); - close(fd); - - if(!(f1 = fopen(file,"r+")) || - (fd = dup(fileno(f1))) < 0 || - !(f2 = fdopen(fd,"r+")) ) - return Failed(file); - - if(fread(buf, 1, 7, f2) != 7 || ftell(f2) != 7) - return Failed(file); - - if(fseek(f1, 1010, 0) < 0 || ftell(f1) != 1010) - return Failed(file); - - fflush(f2); /* this should set the seek location to 1010 */ - if(ftell(f2) != 1010) - return Failed(file); - - unlink(file); - return 0; - } -}end - -cat{ - #ifndef _AST_STD_H - # if _sys_types - # include - # endif - #endif - #if !_typ_ssize_t - # define _typ_ssize_t 1 - typedef int ssize_t; - #endif -}end diff --git a/windows/include/ast_common.h b/windows/include/ast_common.h deleted file mode 100644 index 32442fde4..000000000 --- a/windows/include/ast_common.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id$ $Revision$ */ -/* vim:set shiftwidth=4 ts=8: */ - -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - *************************************************************************/ - -/* : : generated from features/common by iffe version 1999-08-11 : : */ -#ifndef _AST_COMMON_H -#define _AST_COMMON_H 1 - -#undef _sys_types -#define _sys_types 1 /* #include ok */ - -#undef _typ_ssize_t -#define _typ_ssize_t 0 /* ssize_t is a type */ - -#ifndef _AST_STD_H -# if _sys_types -# include -# endif -#endif -#if !_typ_ssize_t -# undef _typ_ssize_t -# define _typ_ssize_t 1 -typedef int ssize_t; -#endif - -#endif