diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-07-31 08:16:45 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-07-31 08:16:45 -0400 |
commit | 6842690ec1e2d820ee646395fac65be4ad7e79c2 (patch) | |
tree | f7be3aab03caf1ee615875e43abc6ab98edbbec2 /gcc | |
parent | 530fb43c7b769ef7a4409ce43bd9e1fd8b63d525 (diff) | |
download | gcc-6842690ec1e2d820ee646395fac65be4ad7e79c2.zip gcc-6842690ec1e2d820ee646395fac65be4ad7e79c2.tar.gz gcc-6842690ec1e2d820ee646395fac65be4ad7e79c2.tar.bz2 |
Add declarations for malloc and realloc..
(PTR_INT_TYPE): New macro.
(pcfinclude): Use it.
From-SVN: r1734
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cccp.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -47,6 +47,12 @@ typedef unsigned char U_CHAR; #define LOCAL_INCLUDE_DIR "/usr/local/include" #endif +#ifdef __STDC__ +#define PTR_INT_TYPE ptrdiff_t +#else +#define PTR_INT_TYPE long +#endif + #include "pcp.h" #ifndef STDC_VALUE @@ -137,7 +143,7 @@ typedef struct { unsigned :16, :16, :16; } vms_ino_t; #define INCLUDE_LEN_FUDGE 0 #endif -/* Exported declarations. */ +/* Forward declarations. */ char *xmalloc (); void error (); @@ -149,6 +155,7 @@ extern char *getenv (); extern FILE *fdopen (); extern char *version_string; extern struct tm *localtime (); +extern char *malloc (), *realloc (); extern int sys_nerr; extern char *sys_errlist[]; @@ -4355,8 +4362,9 @@ pcfinclude (buf, limit, name, op) /* by the text of the string (string_start) */ /* First skip to a longword boundary */ - if ((int)cp & 3) - cp += 4 - ((int)cp & 3); + /* ??? Why a 4-byte boundary? On all machines? */ + if ((PTR_INT_TYPE) cp & 3) + cp += 4 - ((PTR_INT_TYPE) cp & 3); /* Now get the string. */ str = (STRINGDEF *) cp; |