This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
calloc/bzero/memset (Was: egcs-19980531, warning patches)
- To: "EGCS mailing list" <egcs at cygnus dot com>
- Subject: calloc/bzero/memset (Was: egcs-19980531, warning patches)
- From: "Rask Ingemann Lambertsen" <rask at kampsax dot k-net dot dk>
- Date: 09 Jun 98 10:16:44 +0200
- Cc: jbuck at synopsys dot com, law at cygnus dot com, martin dot kahlert at mchp dot siemens dot de
- Cc: ghazi at caip dot rutgers dot edu
- Organization: Me? Organised? Dream on...
Den 08-Jun-98 06:20:17 skrev David Edelsohn fĝlgende om "Re: egcs-19980531, warning patches [part 1/2] ":
> Many systems implement it as malloc/memset, which is our proposed
> implementation if it does not exist on the system. I don't know autoconf
> very well, but even I could test for calloc and provide a default
> implementation if it didn't exist.
AC_CHECK_FUNC(calloc) or something like that.
IMHO, it would be best to use calloc(), fall back to malloc()+memset() if
calloc() is not available, and not use malloc()+bzero() because bzero() is
not in the ANSI C stadard while calloc(), malloc() and memset() are.
Regards,
/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻTŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\
| Rask Ingemann Lambertsen | E-mail: mailto:rask@kampsax.k-net.dk |
| Registered Phase5 developer | WWW: http://www.gbar.dtu.dk/~c948374/ |
| A4000, 775 kkeys/s (RC5-64) | "ThrustMe" on XPilot, ARCnet and IRC |
| You have not converted a man because you have silenced him. |