Обсуждение: mingw compilation problem-> warning: implicit declaration of function `bzero'

Поиск
Список
Период
Сортировка

mingw compilation problem-> warning: implicit declaration of function `bzero'

От
"Rajesh Kumar Mallah"
Дата:
hi,
this is not really a postgres issue.

i am trying to compile a trigger function under MINGW32. its giving the
said warning. the call of bzero is

 bzero(data, sizeof(AuditData));

$  gcc --version
gcc.exe (GCC) 3.4.2 (mingw-special)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

the code compiles fine under linux gcc (version not sure)

can anyone please suggest how to prevent this warning.

regds
mallah.

Re: mingw compilation problem-> warning: implicit declaration of function `bzero'

От
Tom Lane
Дата:
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> writes:
> i am trying to compile a trigger function under MINGW32. its giving the
> said warning. the call of bzero is
>  bzero(data, sizeof(AuditData));

bzero() is long obsolete, and was never officially standard AFAIK.
Use memset() instead:

    memset(data, 0, sizeof(AuditData));

            regards, tom lane

Re: mingw compilation problem-> warning: implicit declaration of function `bzero'

От
james fu
Дата:
could you un-subscribe me - JFU62@yahoo.com?
 
Thank you for the help!

Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Rajesh Kumar Mallah" writes:
> i am trying to compile a trigger function under MINGW32. its giving the
> said warning. the call of bzero is
> bzero(data, sizeof(AuditData));

bzero() is long obsolete, and was never officially standard AFAIK.
Use memset() instead:

memset(data, 0, sizeof(AuditData));

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Never miss an email again!
Yahoo! Toolbar
alerts you the instant new Mail arrives. Check it out.