modify actime and modtime of symbolic links

Hi,

I am trying to duplicate a symbolic link, the new link should be the exact replica of the original one, with same file attributes, permissions, owner, group and even the time.

i m successful in changing the owner and group, but when i try to change the time using utime, the time of the file which is pointed to by this link get updated.

for example, there is file1 and file1_link is a symbolic link to file1. something like this:

lrwxrwxrwx 1 avni avni 5 Feb 27 11:44 file1_link -> file1
-rw-rw-rw- 1 avni avni 2061 Feb 26 18:47 file1

now i have to duplicate file1_link so that i have

lrwxrwxrwx 1 avni avni 5 Feb 27 11:44 file1_link_dup -> file1

but instead i get
lrwxrwxrwx 1 avni avni 5 Feb 28 11:30 file1_link_dup -> file1

when is do utime for file1_link_dup the result is something like this:
lrwxrwxrwx 1 avni avni 5 Feb 27 11:44 file1_link -> file1
-rw-rw-rw- 1 avni avni 2061 Feb 27 11:44 file1
lrwxrwxrwx 1 avni avni 5 Feb 28 11:30 file1_link_dup -> file1

can any body tell how this can be achieved.
I read about lutimes, but its not on my system.

i am writing code in C. I cannot use perl.

I am new to UNIX and hence have little knowledge of the various distributions and commands available.

Can any onw guide on where i should start the search for the solution!!!

Thanks in advance.
Edit/Delete Message

That is the expected behavour for utime()

The utime\(\) function sets the access and modification times of path to the values in the 
utimbuf structure. If times is a NULL pointer, the access and modification times are set 
to the current time. If the named file is a symbolic link, utime\(\) resolves the symbolic link.

Hi fpmurphy,

I know that, but i don't want utime to resolve the symbolic link.

Then you need to roll your own version of utime or lutimes. Look at the source code for these in the FreeBSD sources or any number of other sites.