forked from steveicarus/iverilog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove malloc.h support and for C++ files use <c...> include files.
The functions (malloc, free, etc.) that used to be provided in malloc.h are now provided in cstdlib for C++ files and stdlib.h for C files. Since we require a C99 compliant compiler it makes sense that malloc.h is no longer needed. This patch also modifies all the C++ files to use the <c...> version of the standard C header files (e.g. <cstdlib> vs <stdlib.h>). Some of the files used the C++ version and others did not. There are still a few other header changes that could be done, but this takes care of much of it.
- Loading branch information
1 parent
8122432
commit 1993bf6
Showing
129 changed files
with
299 additions
and
871 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2000 Stephen Williams ([email protected]) | ||
* Copyright (c) 2000-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -20,7 +20,7 @@ | |
# include "config.h" | ||
|
||
# include "Attrib.h" | ||
# include <assert.h> | ||
# include <cassert> | ||
|
||
Attrib::Attrib() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2001 Stephen Williams ([email protected]) | ||
* Copyright (c) 2001-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -23,9 +23,6 @@ | |
# include <cstring> | ||
# include <cstdlib> | ||
# include <climits> | ||
#ifdef HAVE_MALLOC_H | ||
# include <malloc.h> | ||
#endif | ||
|
||
|
||
hname_t::hname_t() | ||
|
@@ -94,4 +91,3 @@ ostream& operator<< (ostream&out, const hname_t&that) | |
|
||
return out; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1999-2007 Stephen Williams ([email protected]) | ||
* Copyright (c) 1999-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -22,7 +22,7 @@ | |
# include "PGate.h" | ||
# include "PExpr.h" | ||
# include "verinum.h" | ||
# include <assert.h> | ||
# include <cassert> | ||
|
||
PGate::PGate(perm_string name, | ||
svector<PExpr*>*pins, | ||
|
@@ -189,4 +189,3 @@ perm_string PGModule::get_type() | |
{ | ||
return type_; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1999-2009 Stephen Williams ([email protected]) | ||
* Copyright (c) 1999-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -20,7 +20,7 @@ | |
# include "config.h" | ||
# include "PWire.h" | ||
# include "PExpr.h" | ||
# include <assert.h> | ||
# include <cassert> | ||
|
||
PWire::PWire(perm_string n, | ||
NetNet::Type t, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2002-2009 Stephen Williams ([email protected]) | ||
* Copyright (c) 2002-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -18,12 +18,9 @@ | |
*/ | ||
|
||
# include "StringHeap.h" | ||
#ifdef HAVE_MALLOC_H | ||
# include <malloc.h> | ||
#endif | ||
# include <stdlib.h> | ||
# include <string.h> | ||
# include <assert.h> | ||
# include <cstdlib> | ||
# include <cstring> | ||
# include <cassert> | ||
|
||
#ifdef CHECK_WITH_VALGRIND | ||
static char **string_pool = NULL; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2002-2008 Stephen Williams ([email protected]) | ||
* Copyright (c) 2002-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -21,7 +21,7 @@ | |
|
||
# include "functor.h" | ||
# include "netlist.h" | ||
# include <assert.h> | ||
# include <cassert> | ||
|
||
bool NetAssign::is_asynchronous() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2003-2008 Stephen Williams ([email protected]) | ||
* Copyright (c) 2003-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -20,9 +20,6 @@ | |
# include <vpi_user.h> | ||
# include <veriuser.h> | ||
# include <stdlib.h> | ||
#ifdef HAVE_MALLOC_H | ||
# include <malloc.h> | ||
#endif | ||
# include <string.h> | ||
# include <assert.h> | ||
# include "config.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2002-2009 Stephen Williams ([email protected]) | ||
* Copyright (c) 2002-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -20,9 +20,6 @@ | |
# include <string.h> | ||
# include <stdlib.h> | ||
# include <stdio.h> | ||
#ifdef HAVE_MALLOC_H | ||
# include <malloc.h> | ||
#endif | ||
|
||
|
||
char* substitutions(const char*str) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1999-2008 Stephen Williams ([email protected]) | ||
* Copyright (c) 1999-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -21,7 +21,7 @@ | |
|
||
# include "netlist.h" | ||
# include <cassert> | ||
# include <stdlib.h> | ||
# include <cstdlib> | ||
# include "ivl_assert.h" | ||
|
||
NetEAccess* NetEAccess::dup_expr() const | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2002-2004 Stephen Williams ([email protected]) | ||
* Copyright (c) 2002-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -22,7 +22,7 @@ | |
# include "PExpr.h" | ||
# include "netlist.h" | ||
# include <iostream> | ||
# include <assert.h> | ||
# include <cassert> | ||
|
||
/* | ||
* The evaluate_attributes function evaluates the attribute | ||
|
@@ -72,4 +72,3 @@ attrib_list_t* evaluate_attributes(const map<perm_string,PExpr*>&att, | |
assert(idx == natt); | ||
return table; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2007 Stephen Williams ([email protected]) | ||
* Copyright (c) 2007-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -20,7 +20,7 @@ | |
#ifndef __ivl_assert_h | ||
#define __ivl_assert_h | ||
|
||
# include <assert.h> | ||
# include <cassert> | ||
|
||
#define ivl_assert(tok, expression) \ | ||
do { \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
%{ | ||
/* | ||
* Copyright (c) 1998-2009 Stephen Williams ([email protected]) | ||
* Copyright (c) 1998-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -31,8 +31,8 @@ | |
# include "parse_misc.h" | ||
# include "parse_api.h" | ||
# include "parse.h" | ||
# include <ctype.h> | ||
# include <string.h> | ||
# include <cctype> | ||
# include <cstring> | ||
# include "lexor_keyword.h" | ||
# include "discipline.h" | ||
# include <list> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2003-2009 Stephen Williams ([email protected]) | ||
* Copyright (c) 2003-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -20,9 +20,6 @@ | |
#include <vpi_user.h> | ||
#include <acc_user.h> | ||
#include <stdlib.h> | ||
#ifdef HAVE_MALLOC_H | ||
#include <malloc.h> | ||
#endif | ||
#include "priv.h" | ||
#include <assert.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2002 Stephen Williams ([email protected]) | ||
* Copyright (c) 2002-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -16,16 +16,10 @@ | |
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | ||
*/ | ||
#ifdef HAVE_CVS_IDENT | ||
#ident "$Id: workarea.c,v 1.1 2002/12/19 21:37:04 steve Exp $" | ||
#endif | ||
|
||
# include <veriuser.h> | ||
# include <vpi_user.h> | ||
# include <stdlib.h> | ||
#ifdef HAVE_MALLOC_H | ||
# include <malloc.h> | ||
#endif | ||
|
||
/* | ||
* Keep a list of sys handle to work area bindings. | ||
|
@@ -82,13 +76,3 @@ PLI_BYTE8* tf_getworkarea(void) | |
|
||
return 0; | ||
} | ||
|
||
/* | ||
* $Log: workarea.c,v $ | ||
* Revision 1.1 2002/12/19 21:37:04 steve | ||
* Add tf_message, tf_get/setworkarea, and | ||
* ty_typep functions, along with defines | ||
* related to these functions. | ||
* | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2001-2009 Stephen Williams ([email protected]) | ||
* Copyright (c) 2001-2010 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -28,8 +28,8 @@ | |
# include <string> | ||
# include <sys/types.h> | ||
# include <dirent.h> | ||
# include <ctype.h> | ||
# include <assert.h> | ||
# include <cctype> | ||
# include <cassert> | ||
|
||
/* | ||
* The module library items are maps of key names to file name within | ||
|
Oops, something went wrong.