www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/19/09:04:05

Message-ID: <B0FEA00E82A7D1118BFB00A0CC9902782131B7@ARGON>
From: Michel de Ruiter <Michel AT smr DOT nl>
To: "'DJGPP workers'" <djgpp-workers AT delorie DOT com>
Date: Fri, 19 Feb 1999 09:16:11 +0100
X-Mailer: Internet Mail Service (5.5.2448.0)
Reply-To: djgpp-workers AT delorie DOT com

Hi, there. I have found some minor buglets in djlsr202. A description
is given for all of them, starting with a `#'. I haven't followed the
workers-list too closely for the last months, so some things might
have already been fixed.

# First a documentation typo and some redundant includes in `rand':

*** src/libc/ansi/stdlib/rand~.txh	Wed Dec  2 20:24:44 1998
--- src/libc/ansi/stdlib/rand.txh	Mon Feb  8 21:19:26 1999
***************
*** 50,56 ****
  @example
  #include <stdlib.h>
  
! int srand(unsigned seed);
  @end example
  
  @subheading Description
--- 50,56 ----
  @example
  #include <stdlib.h>
  
! void srand(unsigned seed);
  @end example
  
  @subheading Description
*** src/libc/ansi/stdlib/rand~.c	Wed Dec  2 20:24:44 1998
--- src/libc/ansi/stdlib/rand.c	Mon Feb  8 21:22:04 1999
***************
*** 2,10 ****
--- 2,7 ----
  /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  #include <stdlib.h>
- #include <pc.h>
- #include <go32.h>
- #include <libc/farptrgs.h>
  
  static unsigned long long next = 1;
  
# Next, I noticed many, many non-ANSI functions in the src/libc/ansi/
# directory and many non-POSIX functions in src/libc/posix/. I think
# most are on purpose, but it might be confusing. Here are all those
# cases, thanks to the new portability info. Comments?

src/libc/ansi/ctype/isascii.txh:22:!ansi, !posix        isascii()
src/libc/ansi/ctype/toascii.txh:22:!ansi, !posix        toascii()
src/libc/ansi/math/acosh.txh:17:!ansi, !posix           acosh()
src/libc/ansi/math/asinh.txh:17:!ansi, !posix           asinh()
src/libc/ansi/math/atanh.txh:17:!ansi, !posix           atanh()
src/libc/ansi/math/hypot.txh:19:!ansi, !posix           hypot()
src/libc/ansi/math/modfl.txh:23:!ansi, !posix           modfl()
src/libc/ansi/math/pow10.txh:17:!ansi, !posix           pow10()
src/libc/ansi/math/pow2.txh:17:!ansi, !posix            pow2()
src/libc/ansi/stdio/doprnt.txh:24:!ansi, !posix         _doprnt()
src/libc/ansi/stdio/doscan.txh:25:!ansi, !posix         _doscan()
src/libc/ansi/stdio/fwalk.txh:21:!ansi, !posix          _fwalk()
src/libc/ansi/stdio/getw.txh:24:!ansi, !posix           getw()
src/libc/ansi/stdio/putw.txh:22:!ansi, !posix           putw()
src/libc/ansi/stdio/rename.txh:89:!ansi, !posix         _rename()
src/libc/ansi/stdio/setbuffe.txh:31:!ansi, !posix       setbuffer()
src/libc/ansi/stdio/setlineb.txh:29:!ansi, !posix       setlinebuf()
src/libc/ansi/stdlib/atold.txh:23:!ansi, !posix         atold()
src/libc/ansi/stdlib/llabs.txh:21:!ansi, !posix         llabs()
src/libc/ansi/stdlib/lldiv.txh:28:!ansi, !posix         lldiv()
src/libc/ansi/stdlib/strtold.txh:22:!ansi, !posix       strtold()
src/libc/ansi/stdlib/strtoll.txh:28:!ansi, !posix       strtoll()
src/libc/ansi/stdlib/strtoull.txh:21:!ansi, !posix      strtoull()
src/libc/ansi/string/syserrls.txh:17:!ansi, !posix      sys_errlist
src/libc/ansi/string/syserrls.txh:42:!ansi, !posix      sys_nerr
src/libc/ansi/time/ctime.txh:183:!ansi, posix           tzset()

src/libc/posix/dirent/seekdir.txh:24:!ansi, !posix      seekdir()
src/libc/posix/dirent/telldir.txh:22:!ansi, !posix      telldir()
src/libc/posix/fcntl/open.txh:169:!ansi, !posix         __djgpp_share_flags
src/libc/posix/grp/getgrent.txh:36:!ansi, !posix        getgrent()
src/libc/posix/grp/getgrent.txh:68:!ansi, !posix        fgetgrent()
src/libc/posix/grp/getgrent.txh:92:!ansi, !posix        setgrent()
src/libc/posix/grp/getgrent.txh:115:!ansi, !posix       endgrent()
src/libc/posix/pwd/pwent.txh:31:!ansi, !posix           getpwent()
src/libc/posix/pwd/pwent.txh:66:!ansi, !posix           setpwent()
src/libc/posix/pwd/pwent.txh:89:!ansi, !posix           endpwent()
src/libc/posix/signal/itimer.txh:22:!ansi, !posix       getitimer()
src/libc/posix/signal/itimer.txh:69:!ansi, !posix       setitimer()
src/libc/posix/sys/stat/djbits.txh:67:!ansi, !posix     _djstat_flags
src/libc/posix/sys/stat/djbits.txh:177:!ansi, !posix    _djstat_fail_bits
src/libc/posix/sys/stat/filelen.txh:23:!ansi, !posix    filelength()
src/libc/posix/sys/stat/fixpath.txh:37:!ansi, !posix    _fixpath()
src/libc/posix/sys/stat/is_exec.txh:45:!ansi, !posix    _is_executable()
src/libc/posix/sys/stat/st_loss.txh:51:!ansi, !posix
_djstat_describe_lossage()
src/libc/posix/sys/stat/xstat.txh:37:!ansi, !posix      _invent_inode()
src/libc/posix/termios/tminit.txh:21:!ansi, !posix
__libc_termios_init()
src/libc/posix/unistd/symlink.txh:42:!ansi, !posix      symlink()

# I then scanned for the reverse case: ANSI/POSIX functions in a
# general directory. Maybe we should move (some of) them to
# src/libc/(ansi|posix) ? Are they really all ANSI/POSIX?

src/libc/go32/dpmiexcp.txh:22:ansi, posix               raise()
src/libc/go32/dpmiexcp.txh:250:ansi, posix              signal()
src/libc/pc_hw/timer/clock.txh:22:ansi, posix           clock()

src/libc/ansi/time/ctime.txh:183:!ansi, posix           tzset()
src/libc/crt0/crt0.txh:142:!ansi, posix                 _exit()
src/libc/crt0/crt0.txh:169:!ansi, posix                 __exit()
src/libc/dos/io/fmode.txh:20:!ansi, posix               _fmode

# I think that the following functions are neither ANSI nor POSIX. So
# says include/netinet/in.h, so documentation fix follows... Does
# anyone know why the portability info conflicted with the header
# files?

src/libc/pc_hw/endian/htonl.txh:22:ansi, posix          htonl()
src/libc/pc_hw/endian/htons.txh:22:ansi, posix          htons()
src/libc/pc_hw/endian/ntohl.txh:22:ansi, posix          ntohl()
src/libc/pc_hw/endian/ntohs.txh:22:ansi, posix          ntohs()

diff -c _endian/htonl.txh src/libc/pc_hw/endian/htonl.txh
*** _endian/htonl.txh	Sun Sep 27 15:21:58 1998
--- src/libc/pc_hw/endian/htonl.txh	Mon Feb  8 22:00:10 1999
***************
*** 19,25 ****
  
  @subheading Portability
  
! @portability ansi, posix
  
  @subheading Example
  
--- 19,25 ----
  
  @subheading Portability
  
! @portability !ansi, !posix
  
  @subheading Example
  
diff -c _endian/htons.txh src/libc/pc_hw/endian/htons.txh
*** _endian/htons.txh	Sun Sep 27 15:21:58 1998
--- src/libc/pc_hw/endian/htons.txh	Mon Feb  8 22:00:00 1999
***************
*** 19,30 ****
  
  @subheading Portability
  
! @portability ansi, posix
  
  @subheading Example
  
  @example
  tcp.port = htons(port);
  @end example
- 
- 
--- 19,28 ----
  
  @subheading Portability
  
! @portability !ansi, !posix
  
  @subheading Example
  
  @example
  tcp.port = htons(port);
  @end example
diff -c _endian/ntohl.txh src/libc/pc_hw/endian/ntohl.txh
*** _endian/ntohl.txh	Sun Sep 27 15:21:58 1998
--- src/libc/pc_hw/endian/ntohl.txh	Mon Feb  8 21:59:46 1999
***************
*** 19,25 ****
  
  @subheading Portability
  
! @portability ansi, posix
  
  @subheading Example
  
--- 19,25 ----
  
  @subheading Portability
  
! @portability !ansi, !posix
  
  @subheading Example
  
diff -c _endian/ntohs.txh src/libc/pc_hw/endian/ntohs.txh
*** _endian/ntohs.txh	Sun Sep 27 15:22:00 1998
--- src/libc/pc_hw/endian/ntohs.txh	Mon Feb  8 22:00:16 1999
***************
*** 19,25 ****
  
  @subheading Portability
  
! @portability ansi, posix
  
  @subheading Example
  
--- 19,25 ----
  
  @subheading Portability
  
! @portability !ansi, !posix
  
  @subheading Example
  
# Last, while doing this, I encountered the following documentation,
# which suggests that `getdtablesize' is a POSIX function, but then
# says it isn't. Which one is wrong?

j:/contrib/djlsr202/src/libc/compat/unistd/getstubs.txh
@node getdtablesize, posix
...
@portability !ansi, !posix

# Oh, real final one now. These test files are unnecessary:

tests/libc/dos/io/filesys.c.orig
tests/libc/dos/io/makefile.orig

# In the mean time I found two other bugs. Fixes follow, please check:

*** tests/libclink/check.cc~	Sun Sep  7 22:56:30 1997
--- tests/libclink/check.cc	Thu Feb 18 23:13:32 1999
***************
*** 41,47 ****
  "strncpy", "strpbrk", "strrchr", "strspn", "strstr", "strtod",
  "strtok", "strtol", "strtoul", "strxfrm", "system", "tan", "tanh",
  "time", "tmpfile", "tmpnam", "tolower", "toupper", "tzname", "ungetc",
! "wcstombs", "vfprintf", "vprintf", "vsprintf", "wcstombs", "wctomb", 0
  };
  
  char *posix_fns[] = { "_exit", "access", "alarm", "cfgetispeed",
--- 41,47 ----
  "strncpy", "strpbrk", "strrchr", "strspn", "strstr", "strtod",
  "strtok", "strtol", "strtoul", "strxfrm", "system", "tan", "tanh",
  "time", "tmpfile", "tmpnam", "tolower", "toupper", "tzname", "ungetc",
! "vfprintf", "vprintf", "vsprintf", "wcstombs", "wctomb", 0
  };
  
  char *posix_fns[] = { "_exit", "access", "alarm", "cfgetispeed",
*** include/wctype.h~	Tue Oct 27 21:06:50 1998
--- include/wctype.h	Thu Feb 18 23:35:36 1999
***************
*** 34,44 ****
  typedef unsigned short wctype_t;
  typedef const unsigned char *wctrans_t;
  
- 
- #endif /* !_POSIX_SOURCE */
- #endif /* !__STRICT_ANSI__ */
- #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
- 
  #ifndef __dj_ENFORCE_FUNCTION_CALLS
  #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  
--- 34,39 ----


*Groeten, Michel* _http://www.cs.vu.nl/~mdruiter_
   ____________ 
   \  /====\  /   "You know, Beavis, you need things that suck,
    \/      \/     to have things that are cool", Butt-Head.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019