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

Bug#699483: marked as done (libc6: ctime() returns a string with an embedded newline)



Your message dated Mon, 04 Feb 2013 10:54:09 +0100
with message-id <510F8541.2080206@aurel32.net>
and subject line Re: Bug#699483: libc6: ctime() returns a string with an embedded newline
has caused the Debian Bug report #699483,
regarding libc6: ctime() returns a string with an embedded newline
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
699483: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699483
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Subject: libc6: ctime() returns a string with an embedded newline character
Package: libc6
Version: 2.11.3-3
Severity: minor

The function ctime() (sys/time.h) returns a string with an
embedded newline character.

Program to reproduce:
*********************
/* foo.c */
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>

int main(int argc, char** argv) {
  time_t now;

  now = time(NULL);
  /*                    V note there is no newline char */
  printf("The date is %s",ctime(&now));
  exit(EXIT_SUCCESS);
}
***********************

Expected Output:
*********************
$./foo
The date is Thu Jan 31 15:10:55 2013$
*********************
Note that the shell prompt should directly follow program output.

Observed Output:
**********************
$./foo
The date is Thu Jan 31 15:10:55 2013
$
**********************
Note that the shell prompt appears on the next line, indicating the presence
of a newline character.

-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6 depends on:
ii  libc-bin                      2.11.3-3   Embedded GNU C Library: Binaries
ii  libgcc1                       1:4.4.5-8  GCC support library

Versions of packages libc6 recommends:
ii  libc6-i686                    2.11.3-3   Embedded GNU C Library: Shared lib

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]         1.5.36.1   Debian configuration management sy
pn  glibc-doc                     <none>     (no description available)
ii  locales                       2.11.3-3   Embedded GNU C Library: National L

-- debconf information:
  glibc/upgrade: true
  glibc/restart-services:
  glibc/disable-screensaver:
  glibc/restart-failed:

--- End Message ---
--- Begin Message ---
Le 31/01/2013 23:03, Steven Messervey a écrit :
> Subject: libc6: ctime() returns a string with an embedded newline character
> Package: libc6
> Version: 2.11.3-3
> Severity: minor
> 
> The function ctime() (sys/time.h) returns a string with an
> embedded newline character.
> 

Which means it conforms to the standard, see:
- http://pubs.opengroup.org/onlinepubs/009695299/functions/ctime.html
- http://pubs.opengroup.org/onlinepubs/009695299/functions/asctime.html

I am therefore closing the bug.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

--- End Message ---

Reply to: