473,473 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Question about function "settimeofday"

Hi,

Which standard does the function "settimeofday" belong to, ISO C or
POSIX, or .... ??

I have checked that the header <sys/time.hneeds to be included to
use above function, and this header is not part of ISO C, but the XSI
extension part of POSIX.

But in GNU C library, it really declares above function, and what's
more strange, the implementation of this function looks like this:

--------------------------------------------------------------------------------------------------
/* Set the current time of day and timezone information.
This call is restricted to the super-user. */
int
__settimeofday (tv, tz)
const struct timeval *tv;
const struct timezone *tz;
{
__set_errno (ENOSYS);
return -1;
}
-----------------------------------------------------------------------------------------------------

Obviously, this function can't be used by normal user, but what if I'm
root? If a root user writes some code of calling this function, what
will happen? Which function will be exactly invoked, above one, or
other inside OS?

Appreciate your help!

- Martin
Apr 2 '08 #1
0 1311

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: CoolPint | last post by:
While I was testing my understanding of Functioin Template features by playing with simple function templates, I got into a problem which I cannot understand. I would be very grateful if someone...
6
by: Patrick Kowalzick | last post by:
Dear all, I have the following code: // ************************ class A {}; class B : public A {}; void foo( const B & ) {}
2
by: VB Programmer | last post by:
I noticed that for build in class methods when you hit "dot" the function lists show up and a brief description (for each highlighted method). In VB.NET how can I do this for custom methods in...
0
by: Shapper | last post by:
Hello, When I call a funtion when a button is pressed I should use: Sub loadPage(sender As Object, E As System.EventArgs, pageURL As String) ... If I call the function from, for example,...
3
by: amadain | last post by:
Help. I'm new to php. I wrote a function that did not seem to work so I checked whether the parameter I was passing to the function was actually being used. I found that it wasn't. When I run the...
7
by: slightly eskew | last post by:
Hello, brand new to programming and found this site last night, enjoying it immensely. I'm writing a program for an intro C++ class. Im looking for a function that can determine an input's type. ...
12
by: ed | last post by:
Hi there, I just remembered this from a few days ago, and was looking for a reason for it. I was trying to call a function as so: addEvent( whatever, whatever, functionName() ); and as I...
9
by: lorlarz | last post by:
I still have a question regarding the following code, in a commonly used routine. First, Here's the code in question: Function.prototype.bind = function(){ var fn = this, args =...
1
by: love91501 | last post by:
I was wondering if anyone would be able to help me figure out how to make my Q010 have the ability to chose 2 answers, I'm hoping to stay away from checkboxes but I am willing to take in any advice....
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.