NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Query about rename() prototype?


I am using NetBSD sources for my system and I have a question
about rename() function prototype.

I have seen the prototype of rename() is added the following two places:

% cat src/include/unistd.h
 * X/Open Portability Guide <= Issue 3
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0) <= 3
int      rename(const char *, const char *) __RENAME(__posix_rename);

% cat src/include/stdio.h

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
int      rename (const char *, const char *) __RENAME(__posix_rename);
int      rename (const char *, const char *);

>From the POSIX specifications link below:

It is noticed that the prototype should be in <stdio.h>

I understand that if my application is _XOPEN_SOURCE complaint
then i have the prototype in <unistd.h> as well.

My query is:

In my application to which prototype should i refer from stdio.h or
unistd.h? (Do i need to modify my application?)

Thanks in advance!!

thanks and regards,
Bala Jagadiswara

Home | Main Index | Thread Index | Old Index