Главная страница


ru.unix.bsd

 
 - RU.UNIX.BSD ------------------------------------------------------------------
 From : yx                                   2:5020/400     02 Dec 2001  06:55:17
 To : Sergey Matveychuk
 Subject : Re: ftime(2)
 -------------------------------------------------------------------------------- 
 
 Sergey Matveychuk <sem@euro.ru> wrote:
 
 >>> Hе понял! Где описание ftime(2)?
 >>>
 >> раз:
 >> % susv2def ftime
 > 
 > Я имел ввиду определение функции.
 >
 >> This interface is obsoleted by gettimeofday(2).  It is available from the
 >>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 > 
 > Это читал. Hо в libc то сама функция есть,
 >
 
  в libcompat
 
 > почему нет ее определения в sys/timeb.h?
 > 
 
  как нет?
 
  #ifndef _SYS_TIMEB_H_
  #define _SYS_TIMEB_H_
 
  /* The ftime(2) system call structure -- deprecated. */
  struct timeb {
   time_t  time;       /* seconds since the Epoch */
   unsigned short millitm;     /* + milliseconds since the Epoch */
   short   timezone;    /* minutes west of CUT */
   short   dstflag;    /* DST == non-zero */
  };
 
  #ifndef _KERNEL
  #include <sys/cdefs.h>
 
  __BEGIN_DECLS
  int ftime __P((struct timeb *));
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  __END_DECLS
  #endif /* _KERNEL */
 
  #endif /* !_SYS_TIMEB_H_ */
 p.s. ftime(2) - V7, ftime(3) - V7 compat :
  несмотря на все deprecated и obsoleted,
  согласно posix и susv2 декларация ftime() должна быть в <sys/timeb.h>
  (возможно в виде макроса - и то это будет уже не полное соответствие).
  Проверить можно посмотрев вывод после препроцессора (cc -E ftime_code.c)
  код с ftime()/и_инклудами_указанными_в_мануале.
  И если еще и "cc -Wimplicit -c ftime_code.c" скажет -
  "`ftime' implicit declaration" - это уже будет sux.
 
 bye.
 
 -- 
 Vladimir Yakovetsky
 --- ifmail v.2.15dev5
  * Origin: yx disorganized groupie (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Re: ftime(2)   yx   01 Dec 2001 03:04:38 
 Re: ftime(2)   Sergey Matveychuk   01 Dec 2001 16:13:25 
 Re: ftime(2)   yx   02 Dec 2001 06:55:17 
 Re: ftime(2)   Sergey Matveychuk   02 Dec 2001 19:50:28 
Архивное /ru.unix.bsd/292185ef98a45.html, оценка 3 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional