Changeset 146


Ignore:
Timestamp:
May 15, 2003, 4:29:14 PM (22 years ago)
Author:
zap
Message:

Changed to _STD most standard functions.
Added the rules to build c_alias.a from all declared _STD functions
removed a lot of obsolete stuff.
changed crt0.s and dll0.s since we don't EMX anymore.

Location:
trunk/src/emx/src/lib
Files:
1 added
32 deleted
287 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/Attic/ctype/ctype.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1 libc.TSRC += $(addprefix src/lib/ctype/, ctype.c toascii.c tolower.c \
    2   toupper.c _tolower.c _toupper.c isalnum.c isalpha.c iscntrl.c isdigit.c \
    3   isgraph.c islower.c isprint.c ispunct.c isspace.c isupper.c isxdigit.c \
    4   isascii.c)
     1libc.TSRC += $(wildcard src/lib/ctype/*.c)
  • trunk/src/emx/src/lib/Attic/ctype/tolower.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    55int tolower (int c)
    66{
    7   if (c >= 'A' && c <= 'Z')
     7  if isupper (c)
    88    return c + 'a' - 'A';
    99  else
  • trunk/src/emx/src/lib/Attic/ctype/toupper.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    55int toupper (int c)
    66{
    7   if (c >= 'a' && c <= 'z')
     7  if islower (c)
    88    return c - 'a' + 'A';
    99  else
  • trunk/src/emx/src/lib/alias/alias.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11# This submakefile builds c_alias.a, a library that defines
    22# for all C runtime functions an alias with an underscore prefix.
     3#
     4# *****************************************************************
     5# this is a placeholder for now. Ignore it -- everything is garbage
     6#
    37
    48.MODULE := alias
    59.MDESC  := A library of underscored aliases for most C library functions
     10.MDEP   := libc sys app
     11.TKIND  := aout
    612.INSDIR := lib/
    713.TARGET := c_alias$A
    8 .TDEP   := $.st/st/c.a
    9 .FUNC   := access acosl alarm asinl atan2l atanl _atold bcmp bcopy brk \
    10   bzero cbrt cbrtl ceill cfgetispeed cfgetospeed cfsetispeed cfsetospeed \
    11   chdir chmod chsize close closedir copysign copysignf copysignl coshl \
    12   cosl creat cuserid daylight dup dup2 edata end endpwent environ eof \
    13   etext execl execle execlp execlpe execv execve execvp execvpe expl fabsl \
    14   fcloseall fcntl fdopen ffs fgetchar filelength flock floorl flushall fmodl \
    15   fnmatch fork fpathconf fputchar frexpl fstat fsync ftime ftruncate ftw \
    16   gcvt getcwd getegid geteuid getgid getgrgid getgrnam getgroups getlogin \
    17   getopt getpagesize getpass getpgrp getpid getppid getpwent getpwnam \
    18   getpwuid gettimeofday getuid getw getwd glob globfree HUGE hypot hypotl \
    19   index ioctl isascii isatty kill ldexpl _LHUGE log10l logl lseek memccpy \
    20   memicmp mkdir mkstemp mktemp modfl nextafter nextafterf nextafterl open \
    21   opendir optarg opterr optind optmode optopt optswchar pathconf pause pclose \
    22   pipe popen powl profil ptrace putenv putw read readdir readv rewinddir \
    23   rindex rint rintl rmdir sbrk seekdir select setbuffer setgid setmode \
    24   set_new_handler setpgid setpwent settimeofday setuid sigaction sigaddset \
    25   sigdelset sigemptyset sigfillset sigismember siglongjmp sigpending \
    26   sigprocmask sigsetjmp sigsuspend sinhl sinl sleep snprintf sopen spawnl \
    27   spawnle spawnlp spawnlpe spawnv spawnve spawnvp spawnvpe sqrtl stat strdup \
    28   stricmp strlwr strnicmp strnset strptime strrev strset strtof strtold \
    29   strupr swab sysconf sys_errlist sys_nerr tanhl tanl tcdrain tcflow tcflush \
    30   tcgetattr tcgetpgrp tcsendbreak tcsetattr tcsetpgrp tell telldir tempnam \
    31   times timezone toascii trunc truncl truncate ttyname tzname tzset ulimit \
    32   umask uname unlink utime utimes vsnprintf wait waitpid write writev
    33 
    3414include common.smak
    3515
    36 .DIRS := $.$(.TKIND.DIR)src/lib/alias/
    37 .OBJS := $(addprefix $(.DIRS),$(addsuffix .o,$(.FUNC)))
    38 TARGDIRS += $(.DIRS)
     16ALIAS.FUNCS = $(shell gawk -f src/lib/alias/aliasfuncs.awk _)
     17ALIAS._FUNCS = $(shell gawk -f src/lib/alias/aliasfuncs.awk __)
    3918
    40 $(.MODULE): $(.DIRS) $.$(.TARG)
     19$(.MODULE): $.$(.TARG)
    4120
    42 $.$(.TARG): $(.OBJS)
    43         $(DO.LIBRARY)
     21DO.STDALIAS = \
     22  echo 'Aliasing $1 to $2 ...'; \
     23  echo '.stabs "$1",11,0,0,0;.stabs "$2",1,0,0,0;' | as -o $3
    4424
    45 $(.OBJS):
    46         $(COMSPEC) /c src\\lib\\alias\\$(CPU)\\emxalias.cmd $(patsubst %.o,%,$(notdir $@)) _$(patsubst %.o,%,$(notdir $@)) $(subst /,\,$@)
     25# For every aliased function create a .o file containing the alias
     26# and add it to the target library.
     27$.$(.TARG): $.$(.TKIND.DIR)c.a $.$(.TKIND.DIR)sys.a $.$(.TKIND.DIR)c_app.a
     28        $(call RM,$@)
     29        @$(foreach x,$(ALIAS.FUNCS),\
     30          $(call DO.STDALIAS,_$x,__std_$x,$(dir $@)$x.o)$(NL))
     31        @$(foreach x,$(ALIAS._FUNCS),\
     32          $(call DO.STDALIAS,__$x,__std_$x,$(dir $@)_$x.o)$(NL))
     33        $(AR) $(ARFLAGS) $@ $(addprefix $(dir $@),\
     34          $(addsuffix .o,$(ALIAS.FUNCS) $(addprefix _,$(ALIAS._FUNCS))))
     35        @$(call RM,$(addprefix $(dir $@),$(addsuffix .o,$(ALIAS.FUNCS)\
     36          $(addprefix _,$(ALIAS._FUNCS)))))
    4737
    4838include comend.smak
    49 
    50 .FUNC :=
  • trunk/src/emx/src/lib/app/Attic/386/crt2.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    99
    1010        .globl  __entry1
    11         .globl  __environ
     11        .globl  __std_environ
    1212        .globl  __org_environ
    1313
     
    1919        xorl    %ebp, %ebp      /* End of stack frames */
    2020        leal    (%esp), %edi    /* argv[] */
    21         movl    %edi, __environ
     21        movl    %edi, __std_environ
    2222        movl    %edi, __org_environ
    2323        pushl   %edi            /* envp */
     
    3737        ret
    3838
    39         .data
     39        .bss
    4040
    41         .comm   __environ, 4
    42         .comm   __org_environ, 4
     41__std_environ:  .space  4
     42__org_environ:  .space  4
  • trunk/src/emx/src/lib/app/app.smak

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    77.TKIND  := aout
    88.TARGET := c_app$A
    9 .TSRC.386 := $(addprefix 386/,crt2.s crt3.s emxio.s inp8.s inp16.s inp32.s \
    10   inps8.s inps16.s inps32.s outp8.s outp16.s outp32.s outps8.s outps8da.s \
    11   outps16.s outps32.s outpt.s wait0.s wait01.s wait1.s wait10.s)
    12 .TSRC   := $(addprefix src/lib/app/,$(.TSRC.$(CPU)) \
    13   getenv.c putenv.c stdio.c iodata.c)
     9.TSRC.386 := $(wildcard src/lib/app/386/*.s)
     10.TSRC   := $(.TSRC.$(CPU)) $(wildcard src/lib/app/*.c)
    1411.TCF.src/lib/app/stdio.c := -D_NFILES=40
    1512.TCF.src/lib/app/iodata.c := -D_NFILES=40
  • trunk/src/emx/src/lib/app/getenv.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* getenv.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
    56
    6 char *getenv (const char *name)
     7char *_STD(getenv) (const char *name)
    78{
    89  int len;
    910  char **p;
    1011
    11   if (name == NULL || _environ == NULL)
     12  if (name == NULL || environ == NULL)
    1213    return NULL;
    1314  len = strlen (name);
    14   for (p = _environ; *p != NULL; ++p)
     15  for (p = environ; *p != NULL; ++p)
    1516    if (strncmp (*p, name, len) == 0 && (*p)[len] == '=')
    1617      return *p + len + 1;
  • trunk/src/emx/src/lib/app/iodata.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* iodata.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <fcntl.h>
    45#include <emx/io.h>
  • trunk/src/emx/src/lib/app/putenv.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* putenv.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    78#include <emx/time.h>           /* _tzset_flag */
    89
    9 int _putenv (const char *string)
     10int _STD(putenv) (const char *string)
    1011{
    1112  char *s, **p;
     
    2324  else
    2425    len = s - string;
    25   p = _environ;
     26  p = environ;
    2627  env_size = 0;
    2728  if (p != NULL)
     
    3536  if (p == NULL || *p == NULL)
    3637    {
    37       if (_environ == _org_environ)
     38      if (environ == _org_environ)
    3839        {
    3940          p = malloc ((env_size+2) * sizeof (char *));
    4041          if (p == NULL) return -1;
    41           _environ = p;
     42          environ = p;
    4243          if (env_size != 0)
    43             memcpy (_environ, _org_environ, env_size * sizeof (char *));
     44            memcpy (environ, _org_environ, env_size * sizeof (char *));
    4445        }
    4546      else
    4647        {
    47           p = realloc (_environ, (env_size+2) * sizeof (char *));
     48          p = realloc (environ, (env_size+2) * sizeof (char *));
    4849          if (p == NULL) return -1;
    49           _environ = p;
     50          environ = p;
    5051        }
    51       _environ[env_size+0] = (char *)string;
    52       _environ[env_size+1] = NULL;
     52      environ[env_size+0] = (char *)string;
     53      environ[env_size+1] = NULL;
    5354    }
    5455  else
  • trunk/src/emx/src/lib/app/stdio.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* stdio.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
  • trunk/src/emx/src/lib/conv/atof.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* atof.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
    56#include <math.h>
    67
    7 double atof (const char *s)
     8double _STD(atof) (const char *s)
    89{
    910  return strtod (s, NULL);
  • trunk/src/emx/src/lib/conv/atofl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* atofl.c (emx+gcc) -- Copyright (c) 1993-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
    56#include <math.h>
    67
    7 long double _atofl (const char *s)
     8long double _STD(atofl) (const char *s)
    89{
    9   return _strtold (s, NULL);
     10  return strtold (s, NULL);
    1011}
  • trunk/src/emx/src/lib/conv/atoi.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* atoi.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 int atoi (const char *string)
     6int _STD(atoi) (const char *string)
    67{
    78  int n;
  • trunk/src/emx/src/lib/conv/atol.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* atol.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 long atol (const char *string)
     6long _STD(atol) (const char *string)
    67{
    78  long n;
  • trunk/src/emx/src/lib/conv/atoll.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* atoll.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 long long _atoll (const char *string)
     6long long _STD(atoll) (const char *string)
    67{
    78  long long n;
  • trunk/src/emx/src/lib/conv/gcvt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* gcvt.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    910#include <emx/locale.h>
    1011
    11 char *_gcvt (double x, int digits, char *buffer)
     12char *_STD(gcvt) (double x, int digits, char *buffer)
    1213{
    1314  char digstr[DECIMAL_DIG+2], *str, *dst;
  • trunk/src/emx/src/lib/conv/itoa.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* itoa.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
  • trunk/src/emx/src/lib/conv/lltoa.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* lltoa.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 char *_lltoa (long long value, char *string, int radix)
     6char *_STD(lltoa) (long long value, char *string, int radix)
    67{
    78  char *dst;
  • trunk/src/emx/src/lib/conv/ltoa.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* ltoa.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 char *_ltoa (long value, char *string, int radix)
     6char *_STD(ltoa) (long value, char *string, int radix)
    67{
    78  char *dst;
  • trunk/src/emx/src/lib/conv/strtod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strtod.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <math.h>
     
    67#include <emx/float.h>
    78
    8 double strtod (const char *string, char **end_ptr)
     9double _STD(strtod) (const char *string, char **end_ptr)
    910{
    1011  const char *end;
  • trunk/src/emx/src/lib/conv/strtof.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strtof.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <math.h>
     
    67#include <emx/float.h>
    78
    8 float _strtof (const char *string, char **end_ptr)
     9float _STD(strtof) (const char *string, char **end_ptr)
    910{
    1011  const char *end;
  • trunk/src/emx/src/lib/conv/strtol.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strtol.c (emx+gcc) -- Copyright (c) 1990-2001 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <limits.h>
     
    2122#define UTYPE   unsigned long
    2223#ifdef UNSIGNED
    23 #define NAME    strtoul
     24#define NAME    _STD(strtoul)
    2425#define TYPE    unsigned long
    2526#define MAX     ULONG_MAX
    2627#else
    27 #define NAME    strtol
     28#define NAME    _STD(strtol)
    2829#define TYPE    long
    2930#define MAX     LONG_MAX
  • trunk/src/emx/src/lib/conv/strtold.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strtold.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <math.h>
     
    67#include <emx/float.h>
    78
    8 long double _strtold (const char *string, char **end_ptr)
     9long double _STD(strtold) (const char *string, char **end_ptr)
    910{
    1011  const char *end;
  • trunk/src/emx/src/lib/emx_386/syscalls.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/ emx_386/syscalls.h (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
    2 
    3 #define SYSCALL(x) movb $x,%ah;call ___syscall
    42
    53#define ENOMEM     12
  • trunk/src/emx/src/lib/io/_flushst.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    5151              w = 0;
    5252              if (pflags != NULL && (*pflags & O_APPEND))
    53                 _lseek (fh, 0L, SEEK_END);
     53                lseek (fh, 0L, SEEK_END);
    5454            }
    5555          stream->_ptr = stream->_buffer;
  • trunk/src/emx/src/lib/io/_fopen.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1010#define TRUE    1
    1111
    12 FILE *_fopen (FILE *dst, const char *fname, const char *mode, int shflag,
    13               int lock)
     12FILE *_openstream (FILE *dst, const char *fname, const char *mode, int shflag,
     13                   int lock)
    1414{
    1515  char ok, bt;
  • trunk/src/emx/src/lib/io/_fsopen.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1010  f = _newstream ();
    1111  if (f != NULL)
    12     f = _fopen (f, fname, mode, shflag, 1);
     12    f = _openstream (f, fname, mode, shflag, 1);
    1313  return f;
    1414}
  • trunk/src/emx/src/lib/io/_input.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    523523    {
    524524    case 'L':
    525       lx = _strtold (p, &q);
     525      lx = strtold (p, &q);
    526526      break;
    527527    case 'l':
     
    529529      break;
    530530    default:
    531       fx = _strtof (p, &q);
     531      fx = strtof (p, &q);
    532532      break;
    533533    }
  • trunk/src/emx/src/lib/io/_isterm.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    88  int j;
    99
    10   if (!_isatty (handle))
     10  if (!isatty (handle))
    1111    return 0;
    1212  j = __ioctl1 (handle, 0);
  • trunk/src/emx/src/lib/io/_output.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    288288{
    289289  if (x == 'X')
    290     _strupr (str);
     290    strupr (str);
    291291  return cvt_integer (v, ((!zero && v->hash) ? "0x" : NULL),
    292292                      str, zero, FALSE, FALSE);
  • trunk/src/emx/src/lib/io/_seekhdr.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    2424  int saved_errno;
    2525
    26   original_pos = _tell (handle);
    27   if (_read (handle, &exe_hdr, sizeof (exe_hdr)) != sizeof (exe_hdr))
     26  original_pos = tell (handle);
     27  if (read (handle, &exe_hdr, sizeof (exe_hdr)) != sizeof (exe_hdr))
    2828    goto failure;
    2929  if (memcmp (exe_hdr.magic, "MZ", 2) != 0)
    30     return (_lseek (handle, original_pos, SEEK_SET) == -1 ? -1 : 0);
    31   if (_lseek (handle, original_pos + 16 * exe_hdr.hdr_size, SEEK_SET) == -1)
     30    return (lseek (handle, original_pos, SEEK_SET) == -1 ? -1 : 0);
     31  if (lseek (handle, original_pos + 16 * exe_hdr.hdr_size, SEEK_SET) == -1)
    3232    goto failure;
    33   if (_read (handle, &patch, sizeof (patch)) != sizeof (patch))
     33  if (read (handle, &patch, sizeof (patch)) != sizeof (patch))
    3434    goto failure;
    3535  if (memcmp (patch.sig, "emx", 3) != 0)
    3636    goto failure;
    37   if (_lseek (handle, original_pos + patch.hdr_loc_lo
     37  if (lseek (handle, original_pos + patch.hdr_loc_lo
    3838              + 65536L * patch.hdr_loc_hi, SEEK_SET) == -1)
    3939    goto failure;
     
    4242failure:
    4343  saved_errno = errno;
    44   _lseek (handle, original_pos, SEEK_SET);
     44  lseek (handle, original_pos, SEEK_SET);
    4545  errno = saved_errno;
    4646  return -1;
  • trunk/src/emx/src/lib/io/_str_rd.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1111  do
    1212    {
    13       r = _read (fd, buf, nbyte);
     13      r = read (fd, buf, nbyte);
    1414    } while (r == -1 && errno == EINTR);
    1515  return r;
  • trunk/src/emx/src/lib/io/_str_wr.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1111  do
    1212    {
    13       r = _write (fd, buf, nbyte);
     13      r = write (fd, buf, nbyte);
    1414    } while (r == -1 && errno == EINTR);
    1515  return r;
  • trunk/src/emx/src/lib/io/_tempnam.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    8080      memmove (p, prefix, strlen (prefix));
    8181      errno = 0;
    82       if (_access (tmpname, 0) != 0)
     82      if (access (tmpname, 0) != 0)
    8383        {
    8484          if (errno == ENOENT)
     
    9898    }
    9999  free (tmpname);
    100   p = _strdup (buf);
     100  p = strdup (buf);
    101101  if (p == NULL)
    102102    errno = ENOMEM;
  • trunk/src/emx/src/lib/io/_tmpidxn.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    4040      strcat (string + len, ".tmp");
    4141      errno = 0;
    42       if (_access (string, 0) != 0)
     42      if (access (string, 0) != 0)
    4343        {
    4444          if (errno == ENOENT)
  • trunk/src/emx/src/lib/io/access.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* access.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <io.h>
    5 #include <alloca.h>
    66#include <errno.h>
    77#include <emx/io.h>
    88#include <emx/syscalls.h>
    99
    10 int access (const char *name, int mode)
     10int _STD(access) (const char *name, int mode)
    1111{
    1212  int a, slash;
  • trunk/src/emx/src/lib/io/chmod.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* chmod.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    78#include <emx/syscalls.h>
    89
    9 int chmod (const char *name, int pmode)
     10int _STD(chmod) (const char *name, int pmode)
    1011{
    1112  int attr, rc;
  • trunk/src/emx/src/lib/io/chsize.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* chsize.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <io.h>
     
    78#include <emx/syscalls.h>
    89
    9 int chsize (int handle, long length)
     10int _STD(chsize) (int handle, long length)
    1011{
    1112  long n;
  • trunk/src/emx/src/lib/io/close.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* close.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    67#include <emx/syscalls.h>
    78
    8 int close (int handle)
     9int _STD(close) (int handle)
    910{
    1011  if (_fd_flags (handle) == NULL)
  • trunk/src/emx/src/lib/io/creat.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* creat.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <fcntl.h>
    56
    6 int creat (const char *name, int pmode)
     7int _STD(creat) (const char *name, int pmode)
    78{
    8   return _open (name, O_WRONLY|O_TRUNC|O_CREAT, pmode);
     9  return open (name, O_WRONLY|O_TRUNC|O_CREAT, pmode);
    910}
  • trunk/src/emx/src/lib/io/dup.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* dup.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    67#include <emx/syscalls.h>
    78
    8 int dup (int handle)
     9int _STD(dup) (int handle)
    910{
    1011  int new, *pflags1, *pflags2, *pla1, *pla2;
    1112
    1213  if ((pflags1 = _fd_flags (handle)) == NULL
    13       || (pla1 = _fd_lookahead (handle)) == NULL)
     14   || (pla1 = _fd_lookahead (handle)) == NULL)
    1415    {
    1516      errno = EBADF;
     
    2223      || (pla2 = _fd_lookahead (new)) == NULL)
    2324    {
    24       __close (new);
     25      close (new);
    2526      errno = EMFILE;
    2627      return -1;
  • trunk/src/emx/src/lib/io/dup2.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* dup2.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    67#include <emx/syscalls.h>
    78
    8 int dup2 (int handle1, int handle2)
     9int _STD(dup2) (int handle1, int handle2)
    910{
    1011  int *pflags1, *pflags2, *pla1, *pla2;
    1112
    1213  if ((pflags1 = _fd_flags (handle1)) == NULL
    13       || (pla1 = _fd_lookahead (handle1)) == NULL
    14       || handle2 < 0)
     14   || (pla1 = _fd_lookahead (handle1)) == NULL
     15   || handle2 < 0)
    1516    {
    1617      errno = EBADF;
     
    2223
    2324  if ((pflags2 = _fd_init (handle2)) == NULL
    24       || (pla2 = _fd_lookahead (handle2)) == NULL)
     25   || (pla2 = _fd_lookahead (handle2)) == NULL)
    2526    {
    2627      /* TODO: Unfortunately, the original HANDLE2, if there was one,
    2728         is now closed. */
    28       __close (handle2);
     29      close (handle2);
    2930      errno = EMFILE;
    3031      return -1;
  • trunk/src/emx/src/lib/io/eaget.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    66#include <string.h>
    77#include <io.h>
     8#include <alloca.h>
    89#include <errno.h>
    9 #include <alloca.h>
    1010#include <sys/ea.h>
    1111#include "ea.h"
  • trunk/src/emx/src/lib/io/eof.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* eof.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
    56#include <emx/io.h>
    67
    7 int eof (int handle)
     8int _STD(eof) (int handle)
    89{
    910  int *pflags;
     
    1718  if (*pflags & F_EOF)          /* Ctrl-Z reached */
    1819    return 1;
    19   cur = _tell (handle);
     20  cur = tell (handle);
    2021  if (cur < 0)
    2122    return -1;
  • trunk/src/emx/src/lib/io/fclose.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fclose.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
     
    78#include <emx/io.h>
    89
    9 int fclose (FILE *stream)
     10int _STD(fclose) (FILE *stream)
    1011{
    1112  int result;
     
    1718      result = 0;
    1819      result = fflush (stream);
    19       if (_close (stream->_handle) < 0)
     20      if (close (stream->_handle) < 0)
    2021        result = EOF;
    2122      if (result == 0 && (stream->_flags & _IOTMP))
  • trunk/src/emx/src/lib/io/fcloseal.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    44#include <emx/io.h>
    55
    6 int fcloseall (void)
     6int _fcloseall (void)
    77{
    88  int i, n, start;
  • trunk/src/emx/src/lib/io/fcntl.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* fcntl.c (emx+gcc) -- Copyright (c) 1992-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdarg.h>
    45#include <unistd.h>
    56#include <io.h>
    67#include <fcntl.h>
    7 #include <alloca.h>
    88#include <errno.h>
    99#include <limits.h>
     
    3838  for (;;)
    3939    {
    40       fd = _dup (handle);
     40      fd = dup (handle);
    4141      if (fd < 0 || fd >= handle2)
    4242        break;
     
    4646             happens not to work as advertised. */
    4747
    48           _close (fd);
     48          close (fd);
    4949          fd = -1; errno = EMFILE;
    5050          break;
     
    5454  e = errno;
    5555  while (n > 0)
    56     _close (handles[--n]);
     56    close (handles[--n]);
    5757  errno = e;
    5858  return fd;
     
    6060
    6161
    62 int fcntl (int handle, int request, ...)
     62int _STD(fcntl) (int handle, int request, ...)
    6363{
    6464  va_list va;
  • trunk/src/emx/src/lib/io/fdopen.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fdopen.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <io.h>
     
    1213/* Bug: doesn't check for compatible modes (O_ACCMODE) */
    1314
    14 FILE *fdopen (int handle, const char *mode)
     15FILE *_STD(fdopen) (int handle, const char *mode)
    1516{
    1617  char ok, bt;
  • trunk/src/emx/src/lib/io/feof.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* feof.c (emx+gcc) -- Copyright (c) 1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int feof (FILE *s)
     6int _STD(feof) (FILE *s)
    67{
    78  return (s->_flags & _IOEOF ? 1 : 0);
  • trunk/src/emx/src/lib/io/ferror.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* ferror.c (emx+gcc) -- Copyright (c) 1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int ferror (FILE *s)
     6int _STD(ferror) (FILE *s)
    67{
    78  return (s->_flags & _IOERR ? 1 : 0);
  • trunk/src/emx/src/lib/io/fflush.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fflush.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    4647  saved_errno = errno;
    4748  if ((stream->_flags & _IOREAD) && bbuf (stream) &&
    48       _ioctl (stream->_handle, FGETHTYPE, &ft) >= 0 && ft == HT_FILE)
     49      ioctl (stream->_handle, FGETHTYPE, &ft) >= 0 && ft == HT_FILE)
    4950    {
    5051      /* ISO 9899-1990, 7.9.5.2: "The fflush function returns EOF if a
     
    5253      pos = _ftell_nolock (stream);
    5354      if (pos != -1L)
    54         _lseek (stream->_handle, pos, SEEK_SET);
     55        lseek (stream->_handle, pos, SEEK_SET);
    5556    }
    5657  errno = saved_errno;
     
    6465
    6566
    66 int fflush (FILE *stream)
     67int _STD(fflush) (FILE *stream)
    6768{
    6869  int result, n;
  • trunk/src/emx/src/lib/io/fgetc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fgetc.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 int fgetc (FILE *stream)
     11int _STD(fgetc) (FILE *stream)
    1112{
    1213  int r;
  • trunk/src/emx/src/lib/io/fgetchar.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fgetchar.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int fgetchar (void)
     6int _STD(fgetchar) (void)
    67{
    78  return getchar ();
  • trunk/src/emx/src/lib/io/fgetpos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fgetpos.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int fgetpos (FILE *stream, fpos_t *pos)
     6int _STD(fgetpos) (FILE *stream, fpos_t *pos)
    67{
    78  long n;
  • trunk/src/emx/src/lib/io/fgets.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fgets.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 char *fgets (char *buffer, int n, FILE *stream)
     11char *_STD(fgets) (char *buffer, int n, FILE *stream)
    1112{
    1213  int c;
  • trunk/src/emx/src/lib/io/fileleng.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fileleng.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <emx/syscalls.h>
    56
    6 long filelength (int handle)
     7long _STD(filelength) (int handle)
    78{
    89  long cur, n;
  • trunk/src/emx/src/lib/io/fileno.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fileno.c (emx+gcc) -- Copyright (c) 1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int fileno (FILE *s)
     6int _STD(fileno) (FILE *s)
    67{
    78  return s->_handle;
  • trunk/src/emx/src/lib/io/flock.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* flock.c (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/file.h>
    45#include <errno.h>
    56#include <emx/io.h>
    67
    7 int flock (int handle, int operation)
     8int _STD(flock) (int handle, int operation)
    89{
    910  if (_fd_flags (handle) == NULL)
  • trunk/src/emx/src/lib/io/flushall.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* flushall.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 int flushall (void)
     11int _STD(flushall) (void)
    1112{
    1213  int i, n;
  • trunk/src/emx/src/lib/io/fopen.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fopen.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <share.h>
    56#include <emx/io.h>
    67
    7 FILE *fopen (const char *fname, const char *mode)
     8FILE *_STD(fopen) (const char *fname, const char *mode)
    89{
    910  FILE *f;
     
    1112  f = _newstream ();
    1213  if (f != NULL)
    13     f = _fopen (f, fname, mode, SH_DENYNO, 1);
     14    f = _openstream (f, fname, mode, SH_DENYNO, 1);
    1415  return f;
    1516}
  • trunk/src/emx/src/lib/io/fprintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fprintf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    910#include <emx/io.h>
    1011
    11 int fprintf (FILE *stream, const char *format, ...)
     12int _STD(fprintf) (FILE *stream, const char *format, ...)
    1213{
    1314  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/fputc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fputc.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 int fputc (int c, FILE *stream)
     11int _STD(fputc) (int c, FILE *stream)
    1112{
    1213  int r;
  • trunk/src/emx/src/lib/io/fputchar.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fputchar.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int fputchar (int c)
     6int _STD(fputchar) (int c)
    67{
    78  return putchar (c);
  • trunk/src/emx/src/lib/io/fputs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fputs.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <string.h>
    56
    6 int fputs (const char *string, FILE *stream)
     7int _STD(fputs) (const char *string, FILE *stream)
    78{
    89  int len;
  • trunk/src/emx/src/lib/io/fread.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fread.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    1314#define min(a,b) (((a) < (b)) ? (a) : (b))
    1415
    15 size_t fread (void *buffer, size_t size, size_t count, FILE *stream)
     16size_t _STD(fread) (void *buffer, size_t size, size_t count, FILE *stream)
    1617{
    1718  size_t total, left, n;
  • trunk/src/emx/src/lib/io/freopen.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* freopen.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <share.h>
     
    89#include <emx/io.h>
    910
    10 FILE *freopen (const char *fname, const char *mode, FILE *stream)
     11FILE *_STD(freopen) (const char *fname, const char *mode, FILE *stream)
    1112{
    1213  FILE *result;
     
    1516  if (stream->_flags & _IOOPEN)
    1617    fclose (stream);
    17   result = _fopen (stream, fname, mode, SH_DENYNO, 0);
     18  result = _openstream (stream, fname, mode, SH_DENYNO, 0);
    1819  STREAMV_UNLOCK;
    1920  return result;
  • trunk/src/emx/src/lib/io/fscanf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fscanf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    910#include <emx/io.h>
    1011
    11 int fscanf (FILE *stream, const char *format, ...)
     12int _STD(fscanf) (FILE *stream, const char *format, ...)
    1213{
    1314  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/fseek.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fseek.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    3738      int text_mode, n;
    3839
    39       file_pos = _tell (stream->_handle);
     40      file_pos = tell (stream->_handle);
    4041      if (file_pos == -1) return EOF;
    4142      cur_pos = _ftell_nolock (stream);
     
    4748      else if (origin == SEEK_END)
    4849        {
    49           end_pos = _lseek (stream->_handle, 0L, SEEK_END);
    50           _lseek (stream->_handle, file_pos, SEEK_SET);
     50          end_pos = lseek (stream->_handle, 0L, SEEK_END);
     51          lseek (stream->_handle, file_pos, SEEK_SET);
    5152          if (end_pos == -1)
    5253            return EOF;
     
    171172    }
    172173
    173   if (_lseek (stream->_handle, offset, origin) == -1)
     174  if (lseek (stream->_handle, offset, origin) == -1)
    174175    return EOF;
    175176  else
     
    178179
    179180
    180 int fseek (FILE *stream, long offset, int origin)
     181int _STD(fseek) (FILE *stream, long offset, int origin)
    181182{
    182183  int result;
  • trunk/src/emx/src/lib/io/fsetpos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fsetpos.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int fsetpos (FILE *stream, const fpos_t *pos)
     6int _STD(fsetpos) (FILE *stream, const fpos_t *pos)
    67{
    78  if (fseek (stream, pos->_pos, SEEK_SET) != 0)
  • trunk/src/emx/src/lib/io/fstat.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fstat.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <io.h>
     
    89#include <emx/syscalls.h>
    910
    10 int fstat (int handle, struct stat *buffer)
     11int _STD(fstat) (int handle, struct stat *buffer)
    1112{
    1213  int rc;
  • trunk/src/emx/src/lib/io/ftell.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* ftell.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    1920  else
    2021    {
    21       pos = _tell (stream->_handle);
     22      pos = tell (stream->_handle);
    2223      if (pos == -1)
    2324        return -1;
     
    9899
    99100
    100 long ftell (FILE *stream)
     101long _STD(ftell) (FILE *stream)
    101102{
    102103  long r;
  • trunk/src/emx/src/lib/io/ftruncat.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* ftruncat.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    67#include <emx/syscalls.h>
    78
    8 int ftruncate (int handle, long length)
     9int _STD(ftruncate) (int handle, long length)
    910{
    1011  int *pflags;
  • trunk/src/emx/src/lib/io/fwrite.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* fwrite.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    159160
    160161
    161 size_t fwrite (const void *buffer, size_t size, size_t count, FILE *stream)
     162size_t _STD(fwrite) (const void *buffer, size_t size, size_t count, FILE *stream)
    162163{
    163164  size_t r;
  • trunk/src/emx/src/lib/io/getchar.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* getchar.c (emx+gcc) -- Copyright (c) 1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int getchar (void)
     6int _STD(getchar) (void)
    67{
    78  return getc (stdin);
  • trunk/src/emx/src/lib/io/gets.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* gets.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 char *gets (char *buffer)
     11char *_STD(gets) (char *buffer)
    1112{
    1213  int c;
  • trunk/src/emx/src/lib/io/getw.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getw.c (emx+gcc) -- Copyright (c) 1992-1995 by Kai Uwe Rommel */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int getw (FILE *stream)
     6int _STD(getw) (FILE *stream)
    67{
    78  int x;
  • trunk/src/emx/src/lib/io/io.smak

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    2020# bird: added dependency to help make make omf version.
    2121$.omf/src/lib/io/386/binmode.obj: $.aout/src/lib/io/386/binmode.o
    22 
  • trunk/src/emx/src/lib/io/ioctl.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* ioctl.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <stdarg.h>
     
    1415#define FIONBIO         0x667e
    1516
    16 int ioctl (int handle, int request, ...)
     17int _STD(ioctl) (int handle, int request, ...)
    1718{
    1819  va_list va;
  • trunk/src/emx/src/lib/io/isatty.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* isatty.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
    56#include <emx/io.h>
    67
    7 int isatty (int handle)
     8int _STD(isatty) (int handle)
    89{
    910  int *pflags;
  • trunk/src/emx/src/lib/io/lseek.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* lseek.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    67#include <emx/syscalls.h>
    78
    8 long lseek (int handle, long offset, int origin)
     9long _STD(lseek) (int handle, long offset, int origin)
    910{
    1011  int *pflags, *pla;
  • trunk/src/emx/src/lib/io/mkstemp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* mkstemp.c (emx+gcc) -- Copyright (c) 1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <process.h>
     
    78#include <errno.h>
    89
    9 int mkstemp (char *string)
     10int _STD(mkstemp) (char *string)
    1011{
    1112  int fd, pid, n;
    1213  char *s;
    1314
    14   pid = _getpid ();
     15  pid = getpid ();
    1516  s = strchr (string, 0);
    1617  n = 0;
     
    2930  for (;;)
    3031    {
    31       fd = _open (string, O_RDWR | O_CREAT | O_EXCL, 0600);
     32      fd = open (string, O_RDWR | O_CREAT | O_EXCL, 0600);
    3233      if (fd >= 0 || errno != EEXIST || *s == 'z')
    3334        return fd;
  • trunk/src/emx/src/lib/io/mktemp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* mktemp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <process.h>
     
    67#include <errno.h>
    78
    8 char *mktemp (char *string)
     9char *_STD(mktemp) (char *string)
    910{
    1011  int pid, n, saved_errno;
     
    2627    {
    2728      errno = 0;
    28       if (_access (string, 0) != 0 && errno == ENOENT)
     29      if (access (string, 0) != 0 && errno == ENOENT)
    2930        {
    3031          errno = saved_errno;
  • trunk/src/emx/src/lib/io/open.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* open.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdarg.h>
    45#include <io.h>
     
    67#include <emx/io.h>
    78
    8 int open (const char *name, int oflag, ...)
     9int _STD(open) (const char *name, int oflag, ...)
    910{
    1011  va_list va;
  • trunk/src/emx/src/lib/io/pclose.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* pclose.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <process.h>
     
    67#include <emx/io.h>
    78
    8 int pclose (FILE *stream)
     9int _STD(pclose) (FILE *stream)
    910{
    1011  int rc, write_mode;
     
    1819  if (write_mode && fclose (stream) != 0)
    1920    return -1;
    20   if (_waitpid (stream->_pid, &rc, 0) == -1)
     21  if (waitpid (stream->_pid, &rc, 0) == -1)
    2122    return -1;
    2223  if (!write_mode && fclose (stream) != 0 && errno != EBADF)
  • trunk/src/emx/src/lib/io/pipe.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* pipe.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <fcntl.h>
     
    1011int _pipe_size;
    1112
    12 int pipe (int *two_handles)
     13int _STD(pipe) (int *two_handles)
    1314{
    1415  int *pflags1, *pflags2;
  • trunk/src/emx/src/lib/io/popen.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* popen.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
     
    1516
    1617  saved_errno = errno;
    17   _dup2 (org_handle, handle);
    18   _close (org_handle);
    19   _fcntl (handle, F_SETFD, org_private);
     18  dup2 (org_handle, handle);
     19  close (org_handle);
     20  fcntl (handle, F_SETFD, org_private);
    2021  errno = saved_errno;
    2122}
     
    2829  const char *sh, *base, *opt;
    2930
    30   _fcntl (pipe_local, F_SETFD, 1);
    31   org_private = _fcntl (handle, F_GETFD, 0);
     31  fcntl (pipe_local, F_SETFD, 1);
     32  org_private = fcntl (handle, F_GETFD, 0);
    3233  if (org_private == -1)
    3334    return NULL;
    34   org_handle = _dup (handle);
     35  org_handle = dup (handle);
    3536  if (org_handle == -1)
    3637    return NULL;
    37   _fcntl (org_handle, F_SETFD, 1);
    38   i = _dup2 (pipe_remote, handle);
     38  fcntl (org_handle, F_SETFD, 1);
     39  i = dup2 (pipe_remote, handle);
    3940  if (i != handle)
    4041    {
     
    4344      return NULL;
    4445    }
    45   if (_close (pipe_remote) == -1)
     46  if (close (pipe_remote) == -1)
    4647    {
    4748      restore (org_handle, org_private, handle);
     
    6970  else
    7071    opt = "-c";
    71   i = _spawnlp (P_NOWAIT, sh, sh, opt, command, (char *)0);
     72  i = spawnlp (P_NOWAIT, sh, sh, opt, command, (char *)0);
    7273  if (i == -1)
    7374    {
     
    8283
    8384
    84 FILE *popen (const char *command, const char *mode)
     85FILE *_STD(popen) (const char *command, const char *mode)
    8586{
    8687  int ph[2];
     
    9394      return NULL;
    9495    }
    95   if (_pipe (ph) == -1)
     96  if (pipe (ph) == -1)
    9697    return NULL;
    97   if (_fcntl (ph[0], F_SETFD, 1) == -1)
     98  if (fcntl (ph[0], F_SETFD, 1) == -1)
    9899    return NULL;
    99   if (_fcntl (ph[1], F_SETFD, 1) == -1)
     100  if (fcntl (ph[1], F_SETFD, 1) == -1)
    100101    return NULL;
    101102  if (mode[0] == 'r')
     
    106107    {
    107108      saved_errno = errno;
    108       _close (ph[0]);
    109       _close (ph[1]);
     109      close (ph[0]);
     110      close (ph[1]);
    110111      errno = saved_errno;
    111112    }
  • trunk/src/emx/src/lib/io/printf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* printf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    910#include <emx/io.h>
    1011
    11 int printf (const char *format, ...)
     12int _STD(printf) (const char *format, ...)
    1213{
    1314  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/putchar.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* putchar.c (emx+gcc) -- Copyright (c) 1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int putchar (int c)
     6int _STD(putchar) (int c)
    67{
    78  return putc (c, stdout);
  • trunk/src/emx/src/lib/io/puts.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* puts.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    910#include <emx/io.h>
    1011
    11 int puts (const char *string)
     12int _STD(puts) (const char *string)
    1213{
    1314  int result, len;
  • trunk/src/emx/src/lib/io/putw.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* putw.c (emx+gcc) -- Copyright (c) 1992-1995 by Kai Uwe Rommel */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int putw (int x, FILE *stream)
     6int _STD(putw) (int x, FILE *stream)
    67{
    78  return (fwrite (&x, sizeof (x), 1, stream) == 1 ? x : EOF);
  • trunk/src/emx/src/lib/io/read.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* read.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <io.h>
     
    3738
    3839
    39 int read (int handle, void *buf, size_t nbyte)
     40int _STD(read) (int handle, void *buf, size_t nbyte)
    4041{
    4142  int n, *pflags, *pla;
     
    6162      /* special processing for text mode */
    6263      if (!(*pflags & (F_PIPE|F_SOCKET|F_DEV)) && dst[n-1] == 0x1a &&
    63           _eof (handle))
     64          eof (handle))
    6465        {
    6566          /* remove last Ctrl-Z in text files */
  • trunk/src/emx/src/lib/io/readv.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* readv.c (emx+gcc) -- Copyright (c) 1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    1011#include <sys/uio.h>
    1112
    12 int readv (int handle, const struct iovec *iov, int iovcnt)
     13int _STD(readv) (int handle, const struct iovec *iov, int iovcnt)
    1314{
    1415  int i, n;
     
    4445    }
    4546
    46   n = _read (handle, buf, total);
     47  n = read (handle, buf, total);
    4748  if (n > 0)
    4849    {
  • trunk/src/emx/src/lib/io/rewind.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* rewind.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 void rewind (FILE *stream)
     11void _STD(rewind) (FILE *stream)
    1112{
    1213  STREAM_LOCK (stream);
  • trunk/src/emx/src/lib/io/scanf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* scanf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    910#include <emx/io.h>
    1011
    11 int scanf (const char *format, ...)
     12int _STD(scanf) (const char *format, ...)
    1213{
    1314  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/select.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* select.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <memory.h>
    56#include <io.h>
    6 #include <alloca.h>
    77#include <sys/types.h>
    88#include <sys/time.h>
     
    1212#define MIN(a,b) (((a) < (b)) ? (a) : (b))
    1313
    14 int select (int nfds, fd_set *readfds, fd_set *writefds,
    15              fd_set *exceptfds, struct timeval *timeout)
     14int _STD(select) (int nfds, fd_set *readfds, fd_set *writefds,
     15                  fd_set *exceptfds, struct timeval *timeout)
    1616{
    1717  struct _select args;
  • trunk/src/emx/src/lib/io/setbuf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* setbuf.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int setbuf (FILE *stream, char *buffer)
     6int _STD(setbuf) (FILE *stream, char *buffer)
    67{
    78  return setvbuf (stream, buffer, (buffer != NULL ? _IOFBF : _IONBF), BUFSIZ);
  • trunk/src/emx/src/lib/io/setbuffe.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* setbuffe.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45
    5 int setbuffer (FILE *stream, char *buffer, size_t size)
     6int _STD(setbuffer) (FILE *stream, char *buffer, size_t size)
    67{
    78  return setvbuf (stream, buffer, (buffer != NULL ? _IOFBF : _IONBF), size);
  • trunk/src/emx/src/lib/io/setmode.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* setmode.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <fcntl.h>
     
    67#include <emx/io.h>
    78
    8 int setmode (int handle, int mode)
     9int _STD(setmode) (int handle, int mode)
    910{
    1011  int old_mode, *pflags;
  • trunk/src/emx/src/lib/io/setvbuf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* setvbuf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 int setvbuf (FILE *stream, char *buffer, int mode, size_t size)
     11int _STD(setvbuf) (FILE *stream, char *buffer, int mode, size_t size)
    1112{
    1213  if (!(stream->_flags & _IOOPEN)
  • trunk/src/emx/src/lib/io/snprintf.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* snprintf.c (emx+gcc) -- Copyright (c) 1995-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdarg.h>
     
    67#include <emx/io.h>
    78
    8 int snprintf (char *buffer, size_t n, const char *format, ...)
     9int _STD(snprintf) (char *buffer, size_t n, const char *format, ...)
    910{
    1011  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/sopen.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* sopen.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdarg.h>
    45#include <io.h>
    56#include <emx/io.h>
    67
    7 int sopen (const char *name, int oflag, int shflag, ...)
     8int _STD(sopen) (const char *name, int oflag, int shflag, ...)
    89{
    910  va_list va;
  • trunk/src/emx/src/lib/io/sprintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sprintf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdarg.h>
     
    67#include <emx/io.h>
    78
    8 int sprintf (char *buffer, const char *format, ...)
     9int _STD(sprintf) (char *buffer, const char *format, ...)
    910{
    1011  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/sscanf.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* sscanf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdarg.h>
     
    78#include <emx/io.h>
    89
    9 int sscanf (const char *buffer, const char *format, ...)
     10int _STD(sscanf) (const char *buffer, const char *format, ...)
    1011{
    1112  va_list arg_ptr;
  • trunk/src/emx/src/lib/io/stat.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* stat.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
    56#include <time.h>
    67#include <io.h>
    7 #include <alloca.h>
    88#include <errno.h>
    99#include <sys/types.h>
     
    1313#include <emx/syscalls.h>
    1414
    15 int stat (const char *name, struct stat *buffer)
     15int _STD(stat) (const char *name, struct stat *buffer)
    1616{
    1717  int rc, slash;
  • trunk/src/emx/src/lib/io/tell.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* tell.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <errno.h>
     
    67#include <emx/syscalls.h>
    78
    8 long tell (int handle)
     9long _STD(tell) (int handle)
    910{
    1011  int *pflags, *pla;
  • trunk/src/emx/src/lib/io/tmpfile.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    22/*                        Copyright (c) 1991-1993 by Kolja Elsaesser */
    33
     4#include "libc-alias.h"
    45#include <stdio.h>
    56#include <stdlib.h>
     
    1314
    1415
    15 FILE *tmpfile (void)
     16FILE *_STD(tmpfile) (void)
    1617{
    1718  char name[L_tmpnam];
     
    2425      if (idx == -1)
    2526        return NULL;
    26       fd = _open (name, O_RDWR|O_CREAT|O_EXCL|O_BINARY, 0644);
     27      fd = open (name, O_RDWR|O_CREAT|O_EXCL|O_BINARY, 0644);
    2728    } while (fd == -1 && errno == EEXIST);
    2829  if (fd == -1)
  • trunk/src/emx/src/lib/io/tmpnam.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    22/*                       Copyright (c) 1991-1993 by Kolja Elsaesser */
    33
     4#include "libc-alias.h"
    45#include <stdio.h>
    56#include <emx/thread.h>
     
    78
    89
    9 char *tmpnam (char *string)
     10char *_STD(tmpnam) (char *string)
    1011{
    1112#if defined (__MT__)
  • trunk/src/emx/src/lib/io/truncate.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* truncate.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <fcntl.h>
    56
    6 int truncate (char *name, long length)
     7int _STD(truncate) (char *name, long length)
    78{
    89  int handle, result;
     
    1112  if (handle == -1)
    1213    return -1;
    13   result = _ftruncate (handle, length);
     14  result = ftruncate (handle, length);
    1415  close (handle);
    1516  return result;
  • trunk/src/emx/src/lib/io/ttyname.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* ttyname.c (emx+gcc) -- Copyright (c) 1995-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <emx/syscalls.h>
    56#include <emx/thread.h>
    67
    7 char *ttyname (int handle)
     8char *_STD(ttyname) (int handle)
    89{
    910#if defined (__MT__)
  • trunk/src/emx/src/lib/io/ungetc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* ungetc.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    109110
    110111      if ((stream->_flags & _IOSPECIAL)
    111           || _ioctl (stream->_handle, FGETHTYPE, &ft) < 0
     112          || ioctl (stream->_handle, FGETHTYPE, &ft) < 0
    112113          || ft != HT_FILE)
    113114        return EOF;
     
    150151
    151152
    152 int ungetc (int c, FILE *stream)
     153int _STD(ungetc) (int c, FILE *stream)
    153154{
    154155  int result;
  • trunk/src/emx/src/lib/io/unlink.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* unlink.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <io.h>
    45#include <emx/syscalls.h>
    56
    6 int unlink (const char *name)
     7int _STD(unlink) (const char *name)
    78{
    8   return __remove (name);       /* There are no links */
     9  return remove (name);       /* There are no links */
    910}
  • trunk/src/emx/src/lib/io/utime.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* utime.c (emx+gcc) -- Copyright (c) 1990-2000 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <sys/time.h>
     
    78#include <emx/syscalls.h>
    89
    9 int utime (const char *name, const struct utimbuf *times)
     10int _STD(utime) (const char *name, const struct utimbuf *times)
    1011{
    1112  struct timeval tv[2];
  • trunk/src/emx/src/lib/io/utimes.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* utimes.c (emx+gcc) -- Copyright (c) 1990-2000 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <sys/time.h>
     
    67#include <emx/syscalls.h>
    78
    8 int utimes (const char *name, const struct timeval *tvp)
     9int _STD(utimes) (const char *name, const struct timeval *tvp)
    910{
    1011  struct timeval tv[2];
  • trunk/src/emx/src/lib/io/vfprintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* vfprintf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 int vfprintf (FILE *stream, const char *format, va_list arg_ptr)
     11int _STD(vfprintf) (FILE *stream, const char *format, va_list arg_ptr)
    1112{
    1213  int result;
  • trunk/src/emx/src/lib/io/vfscanf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* vfscanf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    910#include <emx/io.h>
    1011
    11 int vfscanf (FILE *stream, const char *format, va_list arg_ptr)
     12int _STD(vfscanf) (FILE *stream, const char *format, va_list arg_ptr)
    1213{
    1314  int r;
  • trunk/src/emx/src/lib/io/vprintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* vprintf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    89#include <emx/io.h>
    910
    10 int vprintf (const char *format, va_list arg_ptr)
     11int _STD(vprintf) (const char *format, va_list arg_ptr)
    1112{
    1213  int result;
  • trunk/src/emx/src/lib/io/vscanf.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* vscanf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/builtin.h>        /* For <sys/fmutex.h> */
    45#include <sys/fmutex.h>         /* For <sys/rmutex.h> */
     
    78#include <stdlib.h>
    89#include <stdarg.h>
    9 #include <string.h>
    1010#include <emx/io.h>
    1111
    12 int vscanf (const char *format, va_list arg_ptr)
     12int _STD(vscanf) (const char *format, va_list arg_ptr)
    1313{
    1414  int r;
  • trunk/src/emx/src/lib/io/vsnprint.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* vsnprintf.c (emx+gcc) -- Copyright (c) 1995-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <limits.h>
    56#include <emx/io.h>
    67
    7 int vsnprintf (char *buffer, size_t n, const char *format, va_list arg_ptr)
     8int _STD(vsnprintf) (char *buffer, size_t n, const char *format, va_list arg_ptr)
    89{
    910  FILE trick;
  • trunk/src/emx/src/lib/io/vsprintf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* vsprintf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <limits.h>
    56#include <emx/io.h>
    67
    7 int vsprintf (char *buffer, const char *format, va_list arg_ptr)
     8int _STD(vsprintf) (char *buffer, const char *format, va_list arg_ptr)
    89{
    910  FILE trick;
  • trunk/src/emx/src/lib/io/vsscanf.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* vsscanf.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdarg.h>
     6#include <limits.h>
    57#include <string.h>
    6 #include <limits.h>
    78#include <emx/io.h>
    89
    9 int vsscanf (const char *buffer, const char *format, va_list arg_ptr)
     10int _STD(vsscanf) (const char *buffer, const char *format, va_list arg_ptr)
    1011{
    1112  FILE trick;
  • trunk/src/emx/src/lib/io/write.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* write.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <signal.h>
     
    137138
    138139
    139 int write (int handle, const void *buf, size_t nbyte)
     140int _STD(write) (int handle, const void *buf, size_t nbyte)
    140141{
    141142  int n, *pflags;
     
    161162      if (errno == EPIPE)
    162163        {
    163           __raise (SIGPIPE);
     164          raise (SIGPIPE);
    164165          errno = EPIPE;
    165166        }
  • trunk/src/emx/src/lib/io/writev.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* writev.c (emx+gcc) -- Copyright (c) 1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    1011#include <sys/uio.h>
    1112
    12 int writev (int handle, const struct iovec *iov, int iovcnt)
     13int _STD(writev) (int handle, const struct iovec *iov, int iovcnt)
    1314{
    1415  int i, n;
     
    5253    }
    5354
    54   n = _write (handle, buf, total);
     55  n = write (handle, buf, total);
    5556  if (mp != NULL)
    5657    free (mp);
  • trunk/src/emx/src/lib/malloc/calloc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* calloc.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <stddef.h>
     
    1011#include <emx/thread.h>
    1112
    12 void *calloc (size_t count, size_t size)
     13void *_STD(calloc) (size_t count, size_t size)
    1314{
    1415  _UM_MT_DECL
  • trunk/src/emx/src/lib/malloc/expand.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* expand.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <stddef.h>
     
    910#include <emx/umalloc.h>
    1011
    11 void *_expand (void *block, size_t new_size)
     12void *_STD(expand) (void *block, size_t new_size)
    1213{
    1314  return _um_realloc (block, new_size, 4, _UMFI_NOMOVE);
  • trunk/src/emx/src/lib/malloc/free.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* free.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <stddef.h>
     
    910#include <emx/umalloc.h>
    1011
    11 void free (void *block)
     12void _STD(free) (void *block)
    1213{
    1314  _um_free_maybe_lock (block, 1);
  • trunk/src/emx/src/lib/malloc/malloc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* malloc.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <stddef.h>
     
    1011#include <emx/thread.h>
    1112
    12 void *malloc (size_t size)
     13void *_STD(malloc) (size_t size)
    1314{
    1415  _UM_MT_DECL
  • trunk/src/emx/src/lib/malloc/realloc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* realloc.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <stddef.h>
     
    910#include <emx/umalloc.h>
    1011
    11 void *realloc (void *block, size_t new_size)
     12void *_STD(realloc) (void *block, size_t new_size)
    1213{
    1314  if (block == NULL)
  • trunk/src/emx/src/lib/math/cbrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* cbrt.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <math.h>
    45
    5 double _cbrt (double x)
     6double _STD(cbrt) (double x)
    67{
    78  if (x >= 0)
  • trunk/src/emx/src/lib/mbyte/mblen.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* mblen.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <emx/thread.h>
     
    1213
    1314
    14 int mblen (const char *s, size_t n)
     15int _STD(mblen) (const char *s, size_t n)
    1516{
    1617#if defined (__MT__)
  • trunk/src/emx/src/lib/mbyte/mbstowcs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* mbstowcs.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <limits.h>
    56#include <emx/locale.h>
    67
    7 
    8 size_t mbstowcs (wchar_t *pwcs, const char *s, size_t n)
     8size_t _STD(mbstowcs) (wchar_t *pwcs, const char *s, size_t n)
    99{
    1010  int shift, i;
  • trunk/src/emx/src/lib/mbyte/mbtowc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* mbtowc.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <emx/thread.h>
     
    1213
    1314
    14 int mbtowc (wchar_t *pwc, const char *s, size_t n)
     15int _STD(mbtowc) (wchar_t *pwc, const char *s, size_t n)
    1516{
    1617#if defined (__MT__)
  • trunk/src/emx/src/lib/mbyte/wcstombs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* wcstombs.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <ctype.h>
    56#include <emx/locale.h>
    67
    7 size_t wcstombs (char *s, const wchar_t *pwcs, size_t n)
     8size_t _STD(wcstombs) (char *s, const wchar_t *pwcs, size_t n)
    89{
    910  size_t result;
  • trunk/src/emx/src/lib/mbyte/wctomb.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* wctomb.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <limits.h>
     
    1213#endif
    1314
    14 int wctomb (char *s, wchar_t wchar)
     15int _STD(wctomb) (char *s, wchar_t wchar)
    1516{
    1617#if defined (__MT__)
  • trunk/src/emx/src/lib/misc/386/sigsetjm.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    4343        pushl   $0                      /* iset */
    4444        pushl   $3                      /* how: SIG_SETMASK */
    45         call    __sigprocmask
     45        call    _sigprocmask
    4646        addl    $12, %esp
    47471:      xorl    %eax, %eax
     
    6161        pushl   %eax                    /* iset */
    6262        pushl   $3                      /* how: SIG_SETMASK */
    63         call    __sigprocmask
     63        call    _sigprocmask
    6464        addl    $12, %esp
    65651:      movl    1*4(%esp), %eax         /* there */
  • trunk/src/emx/src/lib/misc/abort.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* abort.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <signal.h>
     
    78static sig_atomic_t abort_flag = 0;
    89
    9 void abort (void)
     10void _STD(abort) (void)
    1011{
    1112  sigset_t set;
  • trunk/src/emx/src/lib/misc/abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* abs.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
    22
    3 int abs (int n)
     3#include "libc-alias.h"
     4
     5int _STD(abs) (int n)
    46{
    57  return (n < 0 ? -n : n);
  • trunk/src/emx/src/lib/misc/assert.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
  • trunk/src/emx/src/lib/misc/atexit.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* atexit.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <emx/startup.h>
    56
    6 int atexit (void (*func)(void))
     7int _STD(atexit) (void (*func)(void))
    78{
    89  if (_atexit_n >= sizeof (_atexit_v) / sizeof (_atexit_v[0]))
  • trunk/src/emx/src/lib/misc/bsearch.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* bsearch.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 void *bsearch (const void *key, const void *base, size_t num, size_t width,
    6               int (*compare)(const void *key, const void *element))
     6void *_STD(bsearch) (const void *key, const void *base, size_t num,
     7  size_t width, int (*compare)(const void *key, const void *element))
    78{
    89  int left, right, median, sign;
  • trunk/src/emx/src/lib/misc/chdir.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* chdir.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    67#include <emx/syscalls.h>
    78
    8 int chdir (const char *name)
     9int _STD(chdir) (const char *name)
    910{
    1011  size_t len;
  • trunk/src/emx/src/lib/misc/cuserid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* cuserid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
    56#include <string.h>
    67
    7 char *cuserid (char *buffer)
     8char *_STD(cuserid) (char *buffer)
    89{
    910  static char tmp_name[L_cuserid];
  • trunk/src/emx/src/lib/misc/dirent.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* dirent.c (emx+gcc) */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    3738    const char *base);
    3839
    39 int closedir (DIR *dirp)
     40int _STD(closedir) (DIR *dirp)
    4041{
    4142  free_dircontents (dirp->dd_contents);
     
    4546
    4647
    47 struct dirent *readdir (DIR *dirp)
     48struct dirent *_STD(readdir) (DIR *dirp)
    4849{
    4950  if (dirp->dd_cp == NULL)
     
    6566
    6667
    67 void seekdir (DIR *dirp, long off)
     68void _STD(seekdir) (DIR *dirp, long off)
    6869{
    6970  long i;
    7071  struct _dircontents *dp;
    71  
     72
    7273  if (off >= 0)
    7374    {
     
    8384
    8485
    85 void rewinddir (DIR *dirp)
     86void _STD(rewinddir) (DIR *dirp)
    8687{
    8788  _seekdir (dirp, 0L);
     
    8990
    9091
    91 long telldir (DIR *dirp)
     92long _STD(telldir) (DIR *dirp)
    9293{
    9394  return dirp->dd_loc;
     
    9596
    9697
    97 DIR *opendir (const char *name)
     98DIR *_STD(opendir) (const char *name)
    9899{
    99100  struct stat statb;
     
    104105  char nbuf[MAXPATHLEN+1];
    105106  int len;
    106  
     107
    107108  len = strlen (name);
    108109  memcpy (nbuf, name, len + 1);
     
    113114      nbuf[len] = 0;
    114115    }
    115   if (_stat (nbuf, &statb) < 0)
     116  if (stat (nbuf, &statb) < 0)
    116117    return NULL;
    117118  if ((statb.st_mode & S_IFMT) != S_IFDIR)
  • trunk/src/emx/src/lib/misc/dtread.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    7676  new->next = NULL;
    7777  new->sub = NULL;
    78   new->name = _strdup (dp->find.name);
     78  new->name = strdup (dp->find.name);
    7979  if (new->name == NULL)
    8080    {
  • trunk/src/emx/src/lib/misc/envargs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1313  if (str == NULL || *str == 0)
    1414    return;
    15   str = _strdup (str);
     15  str = strdup (str);
    1616  if (str == NULL)
    1717    return;
  • trunk/src/emx/src/lib/misc/fnexplod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    2121     contains. */
    2222
    23   if (_stat (mask, &st) == 0 && S_ISDIR (st.st_mode))
     23  if (stat (mask, &st) == 0 && S_ISDIR (st.st_mode))
    2424    return NULL;
    2525
     
    4747          strcpy (p, find.name);
    4848          _fnlwr2 (name, name);
    49           q = _strdup (name);
     49          q = strdup (name);
    5050          if (q == NULL)
    5151            {
  • trunk/src/emx/src/lib/misc/fnmatch.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fnmatch.c (emx+gcc) -- Copyright (c) 1994-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <ctype.h>
     
    592593/* This is the public entrypoint, with signed arguments. */
    593594
    594 int fnmatch (const char *mask, const char *name, int flags)
     595int _STD(fnmatch) (const char *mask, const char *name, int flags)
    595596{
    596597  return _fnmatch_unsigned (mask, name, flags);
  • trunk/src/emx/src/lib/misc/fpathcon.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fpathcon.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <limits.h>
     
    78/* Return the POSIX.1  minimum values, for now. */
    89
    9 long fpathconf (int handle, int name)
     10long _STD(fpathconf) (int handle, int name)
    1011{
    1112  switch (name)
  • trunk/src/emx/src/lib/misc/ftw.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* ftw.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    2223  struct dirent *ent;
    2324
    24   dir = _opendir (name_buf);
     25  dir = opendir (name_buf);
    2526  if (dir == NULL)
    2627    return -1;
     
    3031  for (;;)
    3132    {
    32       ent = _readdir (dir);     /* emx version never fails */
     33      ent = readdir (dir);     /* emx version never fails */
    3334      if (ent == NULL)
    3435        break;
     
    4142        }
    4243      strcpy (name_buf + index, ent->d_name);
    43       if (_stat (name_buf, &st) != 0)
     44      if (stat (name_buf, &st) != 0)
    4445        flag = FTW_NS;
    4546      else if ((st.st_mode & S_IFMT) == S_IFDIR)
     
    6162        }
    6263    }
    63   _closedir (dir);
     64  closedir (dir);
    6465  return rc;
    6566}
    6667
    6768
    68 int ftw (const char *path,
    69          int (*fn)(const char *name, const struct stat *stat_ptr, int flag),
    70          int depth)
     69int _STD(ftw) (const char *path,
     70  int (*fn)(const char *name, const struct stat *stat_ptr, int flag),
     71  int depth)
    7172{
    7273  struct stat st;
     
    8081      return -1;
    8182    }
    82   if (_stat (path, &st) != 0)
     83  if (stat (path, &st) != 0)
    8384    return -1;
    8485  if ((st.st_mode & S_IFMT) != S_IFDIR)
  • trunk/src/emx/src/lib/misc/getcwd.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getcwd.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    78#include <emx/syscalls.h>
    89
    9 char *getcwd (char *buffer, size_t size)
     10char *_STD(getcwd) (char *buffer, size_t size)
    1011{
    1112  char tmp[MAXPATHLEN+1];
  • trunk/src/emx/src/lib/misc/getegid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    44#include <sys/types.h>
    55
    6 gid_t getegid (void)
     6gid_t _getegid (void)
    77{
    88  return 0;
  • trunk/src/emx/src/lib/misc/geteuid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    44#include <sys/types.h>
    55
    6 uid_t geteuid (void)
     6uid_t _geteuid (void)
    77{
    88  return 0;
  • trunk/src/emx/src/lib/misc/getgid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getgid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <sys/types.h>
    56
    6 gid_t getgid (void)
     7gid_t _STD(getgid) (void)
    78{
    89  return 0;
  • trunk/src/emx/src/lib/misc/getgrgid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    77/* Dummy function */
    88
    9 struct group *getgrgid (gid_t gid)
     9struct group *_getgrgid (gid_t gid)
    1010{
    1111  static struct group tmp_grp;
  • trunk/src/emx/src/lib/misc/getgrnam.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getgrnam.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <sys/types.h>
     
    78/* Dummy function */
    89
    9 struct group *getgrnam (const char *name)
     10struct group *_STD(getgrnam) (const char *name)
    1011{
    1112  static struct group tmp_grp;
  • trunk/src/emx/src/lib/misc/getgroup.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getgroup.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <sys/types.h>
    56
    6 int getgroups (int gidsetsize, gid_t grouplist [])
     7int _STD(getgroups) (int gidsetsize, gid_t grouplist [])
    78{
    89  return 0;
  • trunk/src/emx/src/lib/misc/getlogin.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getlogin.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
     
    67#include <unistd.h>
    78
    8 char *getlogin (void)
     9char *_STD(getlogin) (void)
    910{
    1011  static char tmp_name[L_cuserid];
  • trunk/src/emx/src/lib/misc/getname.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* getname.c (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    1213/* Note: This function is used by emx.dll. */
    1314
    14 char *_getname (const char *path)
     15char *_STD(getname) (const char *path)
    1516{
    1617  const char *p;
  • trunk/src/emx/src/lib/misc/getopt.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    3434/* Note: `argv' is not const as GETOPT_ANY reorders argv[]. */
    3535
    36 int getopt (int argc, char * argv[], const char *opt_str)
     36int _getopt (int argc, char * argv[], const char *opt_str)
    3737{
    3838  char c, *q;
  • trunk/src/emx/src/lib/misc/getpages.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getpages.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45
    5 int getpagesize (void)
     6int _STD(getpagesize) (void)
    67{
    78  return 4096;
  • trunk/src/emx/src/lib/misc/getpass.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getpass.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45
    5 char *getpass (const char *prompt)
     6char *_STD(getpass) (const char *prompt)
    67{
    78  return _getpass2 (prompt, 1);
  • trunk/src/emx/src/lib/misc/getpass1.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    88  int ht, kbd;
    99
    10   kbd = (_ioctl (0, FGETHTYPE, &ht) == 0 && ht == HT_DEV_CON);
     10  kbd = (ioctl (0, FGETHTYPE, &ht) == 0 && ht == HT_DEV_CON);
    1111  return _getpass2 (prompt, kbd);
    1212}
  • trunk/src/emx/src/lib/misc/getpgrp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getpgrp.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <process.h>
    56#include <sys/types.h>
    67
    7 pid_t getpgrp (void)
     8pid_t _STD(getpgrp) (void)
    89{
    910  return getpid ();
  • trunk/src/emx/src/lib/misc/getpwnam.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getpwnam.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <pwd.h>
     
    910/* Dummy function */
    1011
    11 struct passwd *getpwnam (const char *name)
     12struct passwd *_STD(getpwnam) (const char *name)
    1213{
    1314  if (name == NULL)
  • trunk/src/emx/src/lib/misc/getpwuid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getpwuid.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <pwd.h>
     
    89/* Dummy function */
    910
    10 struct passwd *getpwuid (uid_t uid)
     11struct passwd *_STD(getpwuid) (uid_t uid)
    1112{
    1213  return _getpw (uid, NULL);
  • trunk/src/emx/src/lib/misc/getuid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getuid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <sys/types.h>
    56
    6 uid_t getuid (void)
     7uid_t _STD(getuid) (void)
    78{
    89  return 0;
  • trunk/src/emx/src/lib/misc/getwd.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* getwd.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    78#include <emx/syscalls.h>
    89
    9 char *getwd (char *buffer)
     10char *_STD(getwd) (char *buffer)
    1011{
    1112  if (buffer == NULL)
  • trunk/src/emx/src/lib/misc/glob.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    55#include <errno.h>
    66#include <unistd.h>
     7#include <glob.h>
    78#include <alloca.h>
    89#include <emx/fnmatch.h>
    9 #include <glob.h>
    1010#include <sys/types.h>
    1111#include <dirent.h>
     
    4848  else
    4949    {
    50       s = _strdup (s0);
     50      s = strdup (s0);
    5151      if (s == NULL)
    5252        goto nospace;
     
    176176
    177177
    178 int glob (const char *pattern, int flags,
    179           int (*errfun)(const char *e_path, int e_errno), glob_t *pglob)
     178int _glob (const char *pattern, int flags,
     179           int (*errfun)(const char *e_path, int e_errno), glob_t *pglob)
    180180{
    181181  struct globi g;
  • trunk/src/emx/src/lib/misc/labs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* labs.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
    22
    3 long labs (long n)
     3#include "libc-alias.h"
     4
     5long _STD(labs) (long n)
    46{
    57  return (n < 0 ? -n : n);
  • trunk/src/emx/src/lib/misc/mkdir.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* mkdir.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <errno.h>
    56#include <emx/syscalls.h>
    67
    7 int mkdir (const char *name, long mode)
     8int _STD(mkdir) (const char *name, long mode)
    89{
    9   (void)mode;                     /* Keep the compiler happy */
     10  mode = 0;                     /* Keep the compiler happy */
    1011  if (__mkdir (name) == 0)
    1112    return 0;
  • trunk/src/emx/src/lib/misc/os2bad.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    99{
    1010  __write (2, msg, sizeof (msg) - 1);
    11   exit (2);
     11  _exit (2);
    1212}
  • trunk/src/emx/src/lib/misc/path.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    1010  if (strpbrk (name, "/\\:") != NULL)
    1111    {
    12       if (_access (name, 4) == 0)
     12      if (access (name, 4) == 0)
    1313        strcpy (dst, name);
    1414      else
  • trunk/src/emx/src/lib/misc/pathconf.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* pathconf.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <limits.h>
     
    78/* Return the POSIX.1  minimum values, for now. */
    89
    9 long pathconf (const char *path, int name)
     10long _STD(pathconf) (const char *path, int name)
    1011{
    1112  switch (name)
  • trunk/src/emx/src/lib/misc/perror.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* perror.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
    56
    6 void perror (const char *string)
     7void _STD(perror) (const char *string)
    78{
    89  int e = errno;
     
    1314      fputs (": ", stderr);
    1415    }
    15   if (e >= 0 && e < _sys_nerr)
     16  if (e >= 0 && e < sys_nerr)
    1617    fputs (sys_errlist[e], stderr);
    1718  else
  • trunk/src/emx/src/lib/misc/pwd.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* pwd.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdio.h>
    45#include <stdlib.h>
     
    89#include <emx/pwd.h>
    910
    10 
    1111static void path_assign (char *dst, const char *src, size_t dst_size)
    1212{
     
    1515}
    1616
    17 
    18 struct passwd *_getpw (uid_t uid, const char *name)
     17struct passwd *_STD(getpw) (uid_t uid, const char *name)
    1918{
    2019  static struct passwd tmp_pwd;
     
    5756}
    5857
    59 
    60 struct passwd *getpwent (void)
     58struct passwd *_STD(getpwent) (void)
    6159{
    6260  return NULL;                  /* End of /etc/passwd reached */
    6361}
    6462
    65 
    66 void setpwent (void)
     63void _STD(setpwent) (void)
    6764{
    6865}
    6966
    70 
    71 void endpwent (void)
     67void _STD(endpwent) (void)
    7268{
    7369}
  • trunk/src/emx/src/lib/misc/qsort.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* qsort.c (emx+gcc) -- Copyright (c) 1990-1994 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <memory.h>
    56
    67static void qsort1 (char *l, char *r, size_t width,
    7                     int (*compare)(const void *x1, const void *x2));
     8  int (*compare)(const void *x1, const void *x2));
    89
    9 void qsort (void *base, size_t num, size_t width,
    10             int (*compare)(const void *x1, const void *x2))
     10void _STD(qsort) (void *base, size_t num, size_t width,
     11  int (*compare)(const void *x1, const void *x2))
    1112{
    1213  if (width > 0 && num > 1 && base != NULL)
     
    1617
    1718static void qsort1 (char *l, char *r, size_t width,
    18                     int (*compare)(const void *x1, const void *x2))
     19  int (*compare)(const void *x1, const void *x2))
    1920{
    2021  char *i, *j, *x;
  • trunk/src/emx/src/lib/misc/rand.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* rand.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <emx/thread.h>
     
    1112
    1213
    13 int rand (void)
     14int _STD(rand) (void)
    1415{
    1516#if defined (__MT__)
     
    2223
    2324
    24 void srand (unsigned int seed)
     25void _STD(srand) (unsigned int seed)
    2526{
    2627#if defined (__MT__)
  • trunk/src/emx/src/lib/misc/response.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    4949              p = strchr (line+1, '\n');
    5050              if (p != NULL) *p = 0;
    51               p = _strdup (line);
     51              p = strdup (line);
    5252              if (p == NULL)
    5353                goto out_of_memory;
  • trunk/src/emx/src/lib/misc/rmdir.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* rmdir.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <errno.h>
    56#include <emx/syscalls.h>
    67
    7 int rmdir (const char *name)
     8int _STD(rmdir) (const char *name)
    89{
    910  if (__rmdir (name) == 0)
  • trunk/src/emx/src/lib/misc/setgid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* setgid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <errno.h>
    56#include <sys/types.h>
    67
    7 int setgid (gid_t gid)
     8int _STD(setgid) (gid_t gid)
    89{
    910  if (gid != 0)
  • trunk/src/emx/src/lib/misc/setpgid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* setpgid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <errno.h>
    56#include <sys/types.h>
    67
    7 int setpgid (pid_t pid, pid_t pgid)
     8int _STD(setpgid) (pid_t pid, pid_t pgid)
    89{
    910  errno = ENOSYS;
  • trunk/src/emx/src/lib/misc/setsid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* setsid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <errno.h>
    56#include <sys/types.h>
    67
    7 pid_t setsid (void)
     8pid_t _STD(setsid) (void)
    89{
    910  errno = EPERM;
  • trunk/src/emx/src/lib/misc/setuid.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* setuid.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <errno.h>
    56#include <sys/types.h>
    67
    7 int setuid (uid_t uid)
     8int _STD(setuid) (uid_t uid)
    89{
    910  if (uid != 0)
  • trunk/src/emx/src/lib/misc/sysconf.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* sysconf.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <unistd.h>
    45#include <limits.h>
     
    89/* Return the POSIX.1  minimum values, for now. */
    910
    10 long sysconf (int name)
     11long _STD(sysconf) (int name)
    1112{
    1213  switch (name)
  • trunk/src/emx/src/lib/misc/syserr.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* syserr.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
    3 const char * const sys_errlist[] =
     3#include "libc-alias.h"
     4
     5const char * const _STD(sys_errlist)[] =
    46{
    57  /*  0 EZERO          */ "Error 0",
     
    7274};
    7375
    74 const int sys_nerr = sizeof (sys_errlist) / sizeof (sys_errlist[0]);
     76const int _STD(sys_nerr) = sizeof (_STD(sys_errlist)) / sizeof (_STD(sys_errlist)[0]);
  • trunk/src/emx/src/lib/misc/ulimit.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* ulimit.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdarg.h>
    45#include <stdlib.h>
     
    78#include <emx/syscalls.h>
    89
    9 long ulimit (int cmd, ...)
     10long _STD(ulimit) (int cmd, ...)
    1011{
    1112  va_list arg_ptr;
  • trunk/src/emx/src/lib/misc/uname.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    22/*                      Copyright (c) 1993-1995 by Eberhard Mattes */
    33
     4#include "libc-alias.h"
    45#include <stdlib.h>
    56#include <string.h>
     
    910#define CHR(x)       (char)((x)+'0')
    1011
    11 int uname (struct utsname *name)
     12int _STD(uname) (struct utsname *name)
    1213{
    1314  char *host;
  • trunk/src/emx/src/lib/misc/wildcard.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    5656                  strcpy (p, find.name);
    5757                  _fnlwr2 (p, line+1);
    58                   q = _strdup (line);
     58                  q = strdup (line);
    5959                  if (q == NULL)
    6060                    goto out_of_memory;
  • trunk/src/emx/src/lib/process/execl.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* execl.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int execl (const char *name, const char *arg0, ...)
     8int _STD(execl) (const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/execle.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* execle.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int execle (const char *name, const char *arg0, ...)
     8int _STD(execle) (const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/execlp.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* execlp.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int execlp (const char *name, const char *arg0, ...)
     8int _STD(execlp) (const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/execlpe.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r145 r146  
    11/* execlpe.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int execlpe (const char *name, const char *arg0, ...)
     8int _STD(execlpe) (const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/execv.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* execv.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <process.h>
    45
    5 int execv (const char *name, char * const argv[])
     6int _STD(execv) (const char *name, char * const argv[])
    67{
    78  return spawnv (P_OVERLAY, name, argv);
  • trunk/src/emx/src/lib/process/execve.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* execve.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <process.h>
    45
    5 int execve (const char *name, char * const argv[], char * const envp[])
     6int _STD(execve) (const char *name, char * const argv[], char * const envp[])
    67{
    78  return spawnve (P_OVERLAY, name, argv, envp);
  • trunk/src/emx/src/lib/process/execvp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* execvp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <process.h>
    45
    5 int execvp (const char *name, char * const argv[])
     6int _STD(execvp) (const char *name, char * const argv[])
    67{
    78  return spawnvp (P_OVERLAY, name, argv);
  • trunk/src/emx/src/lib/process/execvpe.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* execvpe.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <process.h>
    45
    5 int execvpe (const char *name, char * const argv[], char * const envp[])
     6int _STD(execvpe) (const char *name, char * const argv[], char * const envp[])
    67{
    78  return spawnvpe (P_OVERLAY, name, argv, envp);
  • trunk/src/emx/src/lib/process/fork.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* fork.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <process.h>
    45#include <emx/syscalls.h>
     
    67extern void _rmutex_fork (void);
    78
    8 int fork (void)
     9int _STD(fork) (void)
    910{
    1011  int pid;
  • trunk/src/emx/src/lib/process/sigaddse.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sigaddse.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <signal.h>
    45#include <errno.h>
    56
    6 int _sigaddset (sigset_t *set, int sig)
     7int _STD(sigaddset) (sigset_t *set, int sig)
    78{
    89  if (sig < 1 || sig >= NSIG)
  • trunk/src/emx/src/lib/process/sigdelse.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sigdelse.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <signal.h>
    45#include <errno.h>
    56
    6 int _sigdelset (sigset_t *set, int sig)
     7int _STD(sigdelset) (sigset_t *set, int sig)
    78{
    89  if (sig < 1 || sig >= NSIG)
  • trunk/src/emx/src/lib/process/sigempty.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sigempty.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <signal.h>
    45
    5 int _sigemptyset (sigset_t *set)
     6int _STD(sigemptyset) (sigset_t *set)
    67{
    78  return __sigemptyset (set);
  • trunk/src/emx/src/lib/process/sigfills.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sigfills.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <signal.h>
    45
    5 int _sigfillset (sigset_t *set)
     6int _STD(sigfillset) (sigset_t *set)
    67{
    78  return __sigfillset (set);
  • trunk/src/emx/src/lib/process/sigismem.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sigismem.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <signal.h>
    45#include <errno.h>
    56
    6 int _sigismember (const sigset_t *set, int sig)
     7int _STD(sigismember) (const sigset_t *set, int sig)
    78{
    89  if (sig < 1 || sig >= NSIG)
  • trunk/src/emx/src/lib/process/spawnl.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnl.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int spawnl (int mode, const char *name, const char *arg0, ...)
     8int _STD(spawnl) (int mode, const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/spawnle.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnle.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int spawnle (int mode, const char *name, const char *arg0, ...)
     8int _STD(spawnle) (int mode, const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/spawnlp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnlp.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int spawnlp (int mode, const char *name, const char *arg0, ...)
     8int _STD(spawnlp) (int mode, const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/spawnlpe.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnlpe.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <stdarg.h>
    56#include <process.h>
    67
    7 int spawnlpe (int mode, const char *name, const char *arg0, ...)
     8int _STD(spawnlpe) (int mode, const char *name, const char *arg0, ...)
    89{
    910  va_list arg_ptr;
  • trunk/src/emx/src/lib/process/spawnv.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnv.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <process.h>
    56
    6 int spawnv (int mode, const char *name, char * const argv[])
     7int _STD(spawnv) (int mode, const char *name, char * const argv[])
    78{
    89  return spawnve (mode, name, argv, NULL);
  • trunk/src/emx/src/lib/process/spawnvp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnvp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stddef.h>
    45#include <process.h>
    56
    6 int spawnvp (int mode, const char *name, char * const argv[])
     7int _STD(spawnvp) (int mode, const char *name, char * const argv[])
    78{
    89  return spawnvpe (mode, name, argv, NULL);
  • trunk/src/emx/src/lib/process/spawnvpe.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* spawnvpe.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
     5#include <process.h>
    46#include <string.h>
    5 #include <process.h>
    67#include <errno.h>
    78
    8 int spawnvpe (int mode, const char *name, char * const argv[],
    9               char * const envp[])
     9int _STD(spawnvpe) (int mode, const char *name, char * const argv[],
     10  char * const envp[])
    1011{
    1112  char exe[512];
  • trunk/src/emx/src/lib/process/system.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* system.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    78#include <errno.h>
    89
    9 int system (const char *name)
     10int _STD(system) (const char *name)
    1011{
    1112  int rc;
     
    2122    }
    2223  if (name == NULL)   /* Check for command interpreter */
    23     return _access (sh, 0) == 0;
     24    return access (sh, 0) == 0;
    2425  if (*name == 0)
    2526    rc = spawnlp (P_WAIT, sh, sh, (char *)0);
  • trunk/src/emx/src/lib/startup/386/crt0.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/ crt0.s (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes
    22
    3         .globl  __text
    4         .globl  ___syscall
    5         .globl  __data
    6         .globl  __heap_base
    7         .globl  __heap_brk
    8         .globl  __heap_end
    9         .globl  __init
     3        .globl  __text
     4        .globl  __data
    105
    11         .text
     6        .text
    127
    138__text:
    14         push    $__data
    15         call    __emx_init
    16         jmp     __init
     9        push    $__data
     10        call    __emx_init
     11        cld
     12        call    __entry1
     13        call    __entry2
     14#if defined (MCRT0)
     15        pushl   $__mcleanup
     16        call    _atexit
     17        addl    $4, %esp
     18        pushl   $__etext
     19        pushl   $__text
     20        call    _monstartup
     21        addl    $2*4, %esp
     22#endif
     23        call    __startup
     24        call    _main
     25        addl    $3*4, %esp
     26        pushl   %eax
     27        call    _exit
     282:      jmp     2b
    1729
    18 ___syscall:
    19         call    __emx_syscall
    20         ret
    21 
    22         .space  6, 0x90                 /* Patch area for rsx */
    23 
    24 __init: cld
    25         call    __entry1
    26         call    __entry2
    27 #if defined (MCRT0)
    28         pushl   $__mcleanup
    29         call    _atexit
    30         addl    $4, %esp
    31         pushl   $__etext
    32         pushl   $__text
    33         call    _monstartup
    34         addl    $2*4, %esp
    35 #endif
    36         call    __startup
    37         call    _main
    38         addl    $3*4, %esp
    39         pushl   %eax
    40         call    _exit
    41 2:      jmp     2b
    42 
    43         .data
    44 
    45 / The data segment starts with a table containing the start and end
    46 / addresses of the text, data and bss segments
     30        .data
    4731
    4832__data:
    49 __heap_base:
    50         .long   0                       /* heap base address */
    51 __heap_end:
    52         .long   0                       /* heap end address */
    53 __heap_brk:
    54         .long   0                       /* heap brk address */
    55         .long   0                       /* heap offset */
    56         .long   __os2dll                /* list of OS/2 DLL references */
    57         .long   0                       /* stack base address */
    58         .long   0                       /* stack end address */
    59         .long   0x02000002              /* flags: application, OMF */
    60         .long   0                       /* reserved */
    61         .long   0                       /* reserved */
    62         .byte   0                       /* options */
    63         .space  63, 0
     33        .long   0xba0bab        // Magic number (error detection)
     34        .long   __os2dll        // list of OS/2 DLL references
    6435
    65 / first element of vector (N_SETA|N_EXT == 21)
    66 
    67 __os2dll:
    68         .long   0, 0
    69 /       .stabs  "__os2dll", 21, 0, 0, 0xffffffff
    70 
    71         .stabs  "___CTOR_LIST__", 21, 0, 0, 0xffffffff
    72         .stabs  "___DTOR_LIST__", 21, 0, 0, 0xffffffff
    73         .stabs  "___crtinit1__", 21, 0, 0, 0xffffffff
    74         .stabs  "___crtexit1__", 21, 0, 0, 0xffffffff
    75         .stabs  "___eh_frame__", 21, 0, 0, 0xffffffff
     36        .stabs  "__os2dll", 21, 0, 0, 0xffffffff
     37        .stabs  "___CTOR_LIST__", 21, 0, 0, 0xffffffff
     38        .stabs  "___DTOR_LIST__", 21, 0, 0, 0xffffffff
     39        .stabs  "___crtinit1__", 21, 0, 0, 0xffffffff
     40        .stabs  "___crtexit1__", 21, 0, 0, 0xffffffff
     41        .stabs  "___eh_frame__", 21, 0, 0, 0xffffffff
  • trunk/src/emx/src/lib/startup/386/crt1.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    1010
    1111
    12         .globl  __entry2
     12        .globl  __entry2
    1313#if !defined (__MT__)
    14         .globl  _errno
     14        .globl  _errno
    1515#endif
    16         .globl  __emx_env
    17         .globl  __emx_vcmp
    18         .globl  __emx_vprt
    19         .globl  __emx_rev
    20         .globl  __osmajor
    21         .globl  __osminor
     16        .globl  __emx_env
     17        .globl  __emx_vcmp
     18        .globl  __emx_vprt
     19        .globl  __emx_rev
     20        .globl  __osmajor
     21        .globl  __osminor
    2222
    23         .text
     23        .text
    2424
    2525__entry2:
    26         call    ___os_version
    27         movb    %al, __osmajor
    28         movb    %ah, __osminor
    29         call    ___emx_version
    30         movl    %eax, __emx_vcmp
    31         movl    %ecx, __emx_rev
    32         movl    %edx, __emx_env
    33         xchgb   %al, %ah
    34         rorl    $16, %eax
    35         xchgb   %al, %ah
    36         movl    %eax, __emx_vprt
    37         movb    $0, __emx_vprt+4
    38         EPILOGUE(_entry2)
     26        call    ___os_version
     27        movb    %al, __osmajor
     28        movb    %ah, __osminor
     29        call    ___emx_version
     30        movl    %eax, __emx_vcmp
     31        movl    %ecx, __emx_rev
     32        movl    %edx, __emx_env
     33        xchgb   %al, %ah
     34        rorl    $16, %eax
     35        xchgb   %al, %ah
     36        movl    %eax, __emx_vprt
     37        movb    $0, __emx_vprt+4
     38        EPILOGUE(_entry2)
    3939
    40         .data
     40        .data
    4141
    4242#if !defined (__MT__)
    43 _errno: .long   0
     43_errno: .long   0
    4444#endif
    45         .comm   __emx_rev, 4
    46         .comm   __emx_env, 4
    47         .comm   __emx_vcmp, 4
    48         .comm   __emx_vprt, 5
    49         .comm   __osmajor, 1
    50         .comm   __osminor, 1
     45        .comm   __emx_rev, 4
     46        .comm   __emx_env, 4
     47        .comm   __emx_vcmp, 4
     48        .comm   __emx_vprt, 5
     49        .comm   __osmajor, 1
     50        .comm   __osminor, 1
  • trunk/src/emx/src/lib/startup/386/dll0.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    22
    33        .globl  __text
    4         .globl  ___syscall
    54        .globl  __data
    6         .globl  __heap_base
    7         .globl  __heap_brk
    8         .globl  __heap_end
    9         .globl  __init
    105
    116        .text
     
    149        push    $__data
    1510        call    __emx_init
    16         jmp     __init
    17 
    18 
    19 ___syscall:
    20         call    __emx_syscall
    21         ret
    22 
    23 __init: cld
     11        cld
    2412        pushl   %ebp
    2513        movl    %esp, %ebp
     
    3321        .data
    3422
    35 / The data segment starts with a table containing the start and end
    36 / addresses of the text, data and bss segments
     23__data:
     24        .long   0xba0bab        // Magic number (error detection)
     25        .long   __os2dll        // list of OS/2 DLL references
    3726
    38 __data:
    39         .long   __text
    40         .long   __etext
    41         .long   __data
    42         .long   __edata
    43         .long   __edata
    44         .long   __end
    45 __heap_base:
    46         .long   0                       /* heap base address */
    47 __heap_end:
    48         .long   0                       /* heap end address */
    49 __heap_brk:
    50         .long   0                       /* heap brk address */
    51         .long   0                       /* heap offset */
    52         .long   __os2dll                /* list of OS/2 DLL references */
    53         .long   0                       /* stack base address */
    54         .long   0                       /* stack end address */
    55         .long   0x02000003              /* flags: DLL, OMF */
    56         .long   0                       /* reserved */
    57         .long   0                       /* reserved */
    58         .byte   0                       /* options */
    59         .space  63, 0
    60 
    61 / first element of vector (N_SETA|N_EXT == 21)
    62 
    63 __os2dll:
    64         .long   0, 0
    65 /       .stabs  "__os2dll", 21, 0, 0, 0xffffffff
    66 
     27        .stabs  "__os2dll", 21, 0, 0, 0xffffffff
    6728        .stabs  "___CTOR_LIST__", 21, 0, 0, 0xffffffff
    6829        .stabs  "___DTOR_LIST__", 21, 0, 0, 0xffffffff
  • trunk/src/emx/src/lib/startup/exit.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* exit.c (emx+gcc) -- Copyright (c) 1990-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <emx/startup.h>
     
    78int _atexit_n = 0;
    89
    9 void exit (int ret)
     10void _STD(exit) (int ret)
    1011{
    1112  int i;
  • trunk/src/emx/src/lib/startup/startup.smak

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    2727        $(CC) $(CFLAGS) -x assembler-with-cpp -DMCRT0 -o tmp1.o $<
    2828        $(CC) $(CFLAGS) -o tmp2.o src/lib/startup/gmon.c
     29        strip --strip-debug tmp1.o tmp2.o
    2930        ld -r -o $@ tmp1.o tmp2.o
    3031        $(call RM,tmp1.o tmp2.o)
  • trunk/src/emx/src/lib/str/memccpy.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* memccpy.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 void *memccpy (void *s1, const void *s2, int c, size_t n)
     6void *_STD(memccpy) (void *s1, const void *s2, int c, size_t n)
    67{
    78  size_t i;
    8  
     9
    910  for (i = 0; i < n; ++i)
    1011    {
  • trunk/src/emx/src/lib/str/memicmp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* memicmp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <ctype.h>
    56
    6 int memicmp (const void *s1, const void *s2, size_t n)
     7int _STD(memicmp) (const void *s1, const void *s2, size_t n)
    78{
    89  size_t i;
    910  int d;
    10    
     11
    1112  for (i = 0; i < n; ++i)
    1213    {
  • trunk/src/emx/src/lib/str/strcoll.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strcoll.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    56/* Ignore the current locale for now. */
    67
    7 int strcoll (const char *string1, const char *string2)
     8int _STD(strcoll) (const char *string1, const char *string2)
    89{
    910  return strcmp (string1, string2);
  • trunk/src/emx/src/lib/str/strcspn.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strcspn.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 size_t strcspn (const char *string1, const char *string2)
     6size_t _STD(strcspn) (const char *string1, const char *string2)
    67{
    78  char table[256];
  • trunk/src/emx/src/lib/str/strdup.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strdup.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <stdlib.h>
    56
    6 char *strdup (const char *string)
     7char *_STD(strdup) (const char *string)
    78{
    89  char *p;
  • trunk/src/emx/src/lib/str/strerror.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strerror.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
    56#include <emx/thread.h>
    67
    7 char *strerror (int errnum)
     8char *_STD(strerror) (int errnum)
    89{
    9   if (errnum >= 0 && errnum < _sys_nerr)
    10     return (char *)_sys_errlist [errnum];
     10  if (errnum >= 0 && errnum < sys_nerr)
     11    return (char *)sys_errlist [errnum];
    1112  else
    1213    {
     
    1920#endif
    2021      memcpy (result, msg, sizeof (msg) - 1);
    21       itoa (errnum, result + sizeof (msg) - 1, 10);
     22      _itoa (errnum, result + sizeof (msg) - 1, 10);
    2223      return result;
    2324    }
  • trunk/src/emx/src/lib/str/stricmp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* stricmp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <ctype.h>
    56
    6 int stricmp (const char *string1, const char *string2)
     7int _STD(stricmp) (const char *string1, const char *string2)
    78{
    89  int d;
  • trunk/src/emx/src/lib/str/strlwr.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strlwr.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <ctype.h>
    56
    6 char *strlwr (char *string)
     7char *_STD(strlwr) (char *string)
    78{
    89  unsigned char *p;
    910
    1011  for (p = (unsigned char *)string; *p != 0; ++p)
    11     if (isupper (*p))
    12       *p = (unsigned char)tolower (*p);
     12    *p = (unsigned char)tolower (*p);
    1313  return string;
    1414}
  • trunk/src/emx/src/lib/str/strncat.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strncat.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strncat (char *string1, const char *string2, size_t count)
     6char *_STD(strncat) (char *string1, const char *string2, size_t count)
    67{
    78  char *dst;
  • trunk/src/emx/src/lib/str/strncmp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strncmp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 int strncmp (const char *string1, const char *string2, size_t count)
     6int _STD(strncmp) (const char *string1, const char *string2, size_t count)
    67{
    78  int d;
  • trunk/src/emx/src/lib/str/strncpy.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strncpy.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strncpy (char *string1, const char *string2, size_t count)
     6char *_STD(strncpy) (char *string1, const char *string2, size_t count)
    67{
    78  char *dst;
  • trunk/src/emx/src/lib/str/strnicmp.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strnicmp.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <ctype.h>
    56
    6 int strnicmp (const char *string1, const char *string2, size_t count)
     7int _STD(strnicmp) (const char *string1, const char *string2, size_t count)
    78{
    89  int d;
  • trunk/src/emx/src/lib/str/strnset.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strnset.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strnset (char *string, int c, size_t count)
     6char *_STD(strnset) (char *string, int c, size_t count)
    67{
    78  char *dst;
  • trunk/src/emx/src/lib/str/strpbrk.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strpbrk.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strpbrk (const char *string1, const char *string2)
     6char *_STD(strpbrk) (const char *string1, const char *string2)
    67{
    78  char table[256];
  • trunk/src/emx/src/lib/str/strrev.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strrev.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strrev (char *string)
     6char *_STD(strrev) (char *string)
    67{
    78  char *p, *q, c;
  • trunk/src/emx/src/lib/str/strset.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strset.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strset (char *string, int c)
     6char *_STD(strset) (char *string, int c)
    67{
    78  char *dst;
  • trunk/src/emx/src/lib/str/strspn.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strspn.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 size_t strspn (const char *string1, const char *string2)
     6size_t _STD(strspn) (const char *string1, const char *string2)
    67{
    78  char table[256];
  • trunk/src/emx/src/lib/str/strstr.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strstr.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    5 char *strstr (const char *string1, const char *string2)
     6char *_STD(strstr) (const char *string1, const char *string2)
    67{
    78  int len1, len2, i;
  • trunk/src/emx/src/lib/str/strtok.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strtok.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <emx/thread.h>
    56
    6 char *strtok (char *string1, const char *string2)
     7char *_STD(strtok) (char *string1, const char *string2)
    78{
    89  char table[256];
     
    1213#define next (tp->_th_strtok_ptr)
    1314#else
    14   static unsigned char *next = NULL;
     15    static unsigned char *next = NULL;
    1516#endif
    1617  if (string1 != NULL)
  • trunk/src/emx/src/lib/str/strupr.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strupr.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <ctype.h>
    56
    6 char *strupr (char *string)
     7char *_STD(strupr) (char *string)
    78{
    89  unsigned char *p;
    910
    1011  for (p = (unsigned char *)string; *p != 0; ++p)
    11     if (islower (*p))
    1212      *p = (unsigned char)toupper (*p);
    1313  return string;
  • trunk/src/emx/src/lib/str/strxfrm.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strxfrm.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45
    56/* Ignore the current locale for now. */
    67
    7 size_t strxfrm (char *string1, const char *string2, size_t count)
     8size_t _STD(strxfrm) (char *string1, const char *string2, size_t count)
    89{
    910  size_t result;
  • trunk/src/emx/src/lib/sys/__ftime.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    2121  tm.tm_year = now.year - 1900;
    2222  tm.tm_isdst = -1;             /* unknown */
    23   ptr->time = (time_t)mktime (&tm);
     23  ptr->time = (time_t)_mktime (&tm);
    2424  ptr->millitm = now.hundredths * 10;
    2525  ptr->timezone = now.timezone;
  • trunk/src/emx/src/lib/sys/__getdrive.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    55#include "syscalls.h"
    66
    7 char __getdrive (void)
     7char _getdrive (void)
    88{
    99  ULONG rc;
  • trunk/src/emx/src/lib/sys/__init.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    44#include <os2emx.h>
    55#include <string.h>
    6 #include <alloca.h>
    76#include <sys/builtin.h>
    87#include <sys/fmutex.h>
    98#include <emx/startup.h>
    109#include <emx/syscalls.h>
     10#include <alloca.h>
    1111
    1212#define SYS_PRIVATE_HEAP_SIZE 0x100000
  • trunk/src/emx/src/lib/sys/__spawnve.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    2929
    3030
    31 int ___spawnve (struct _new_proc *np)
     31int __spawnve (struct _new_proc *np)
    3232{
    3333  ULONG rc;
  • trunk/src/emx/src/lib/sys/brk.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/brk.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <errno.h>
     
    89#include "syscalls.h"
    910
    10 void *__brk (void *brkp)
     11void *_STD(brk) (void *brkp)
    1112{
    1213  ULONG base;
  • trunk/src/emx/src/lib/sys/chdrive.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/chdrive.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <emx/syscalls.h>
    56#include "syscalls.h"
    67
    7 int __chdrive (char drive)
     8int _STD(chdrive) (char drive)
    89{
    910  if (drive >= 'a')
  • trunk/src/emx/src/lib/sys/clock.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/clock.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <emx/syscalls.h>
     
    910   will wrap around after 49 days. */
    1011
    11 long long __clock (void)
     12long long _STD(clock) (void)
    1213{
    1314  ULONG val_ms;
  • trunk/src/emx/src/lib/sys/execname.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    77#include "syscalls.h"
    88
    9 int __execname (char *dst, size_t size)
     9int _execname (char *dst, size_t size)
    1010{
    1111  ULONG rc;
  • trunk/src/emx/src/lib/sys/filesys.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    1010#define QFSA_SIZE 256
    1111
    12 int __filesys (const char *drive, char *name, size_t size)
     12int _filesys (const char *drive, char *name, size_t size)
    1313{
    1414  ULONG rc;
  • trunk/src/emx/src/lib/sys/fsync.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/fsync.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <emx/syscalls.h>
    56#include "syscalls.h"
    67
    7 int __fsync (int handle)
     8int _STD(fsync) (int handle)
    89{
    910  ULONG rc;
  • trunk/src/emx/src/lib/sys/getpid.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/getpid.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include "syscalls.h"
    56
    6 int __getpid (void)
     7int _STD(getpid) (void)
    78{
    89  return _sys_pid;
  • trunk/src/emx/src/lib/sys/getppid.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/getppid.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include "syscalls.h"
    56
    6 int __getppid (void)
     7int _STD(getppid) (void)
    78{
    89  return _sys_ppid;
  • trunk/src/emx/src/lib/sys/kill.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/kill.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
    56#include <errno.h>
    6 #include <emx/syscalls.h>
     7#include <signal.h>
     8#include <sys/process.h>
    79#include "syscalls.h"
    810
    9 int __kill (int pid, int sig)
     11int _STD(kill) (int pid, int sig)
    1012{
    1113  ULONG rc;
    1214  ULONG n;
    1315
    14   if (pid == __getpid ())
     16  if (pid == getpid ())
    1517    {
    1618      if (sig == 0)
    1719        return 0;
    18       return __raise (sig);
     20      return raise (sig);
    1921    }
    2022  else if (sig == SIGINT || sig == SIGBREAK)
  • trunk/src/emx/src/lib/sys/p2t.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    1818  tm.tm_year = d.year + 1980 - 1900;
    1919  tm.tm_isdst = -1;             /* unknown */
    20   return mktime (&tm);
     20  return _mktime (&tm);
    2121}
  • trunk/src/emx/src/lib/sys/pause.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* sys/pause.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSPROCESS
    45#include <os2emx.h>
     
    78#include "syscalls.h"
    89
    9 int pause (void)
     10int _STD(pause) (void)
    1011{
    1112  while (DosSleep (0xffffffff) == 0)
  • trunk/src/emx/src/lib/sys/raise.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/raise.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
     
    89#include "syscalls.h"
    910
    10 int __raise (int signo)
     11int _STD(raise) (int signo)
    1112{
    1213  thread_data *tp;
  • trunk/src/emx/src/lib/sys/remove.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/remove.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <emx/syscalls.h>
    56#include "syscalls.h"
    67
    7 int __remove (const char *name)
     8int _STD(remove) (const char *name)
    89{
    910  ULONG rc;
  • trunk/src/emx/src/lib/sys/rename.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/rename.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <emx/syscalls.h>
    56#include "syscalls.h"
    67
    7 int __rename (const char *old_name, const char *new_name)
     8int _STD(rename) (const char *old_name, const char *new_name)
    89{
    910  ULONG rc;
  • trunk/src/emx/src/lib/sys/sbrk.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/sbrk.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <os2emx.h>
    45#include <errno.h>
     
    910#include "syscalls.h"
    1011
    11 void *__sbrk (int incr)
     12void *_STD(sbrk) (int incr)
    1213{
    1314  ULONG base;
  • trunk/src/emx/src/lib/sys/scrsize.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    66#include <emx/syscalls.h>
    77
    8 void __scrsize (int *dst)
     8void _scrsize (int *dst)
    99{
    1010  VIOMODEINFO vmi1, vmi2, *pvmi;
  • trunk/src/emx/src/lib/sys/sigaction.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* sys/sigactio.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
     
    78#include "syscalls.h"
    89
    9 int __sigaction (int signo, const struct sigaction *iact,
    10                  struct sigaction *oact)
     10int _STD(sigaction) (int signo, const struct sigaction *iact,
     11  struct sigaction *oact)
    1112{
    1213  struct sigaction output, *s;
     
    3738           && sig_info[signo].dfl_action != ST_IGNORE)
    3839          || s->sa_handler == SIG_IGN)
    39         __sigdelset (&tp->sig_pending, signo);
     40        sigdelset (&tp->sig_pending, signo);
    4041    }
    4142
  • trunk/src/emx/src/lib/sys/signal.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/signal.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
     
    910typedef void sigfun (int sig);
    1011
    11 sigfun *__signal (int sig, sigfun *handler)
     12sigfun *_STD(signal) (int sig, sigfun *handler)
    1213{
    1314  if (handler == SIG_ACK)
     
    2324      if (tp == NULL)
    2425        return SIG_ERR;
    25       __sigdelset (&tp->sig_blocked, sig);
     26      sigdelset (&tp->sig_blocked, sig);
    2627      _sys_deliver_pending_signals (tp);
    2728      return tp->signals[sig].sa_handler;
     
    3435      isa.sa_mask = 0;
    3536      isa.sa_flags = SA_ACK;
    36       if (__sigaction (sig, &isa, &osa) != 0)
     37      if (sigaction (sig, &isa, &osa) != 0)
    3738        return SIG_ERR;
    3839      else
  • trunk/src/emx/src/lib/sys/sigpending.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/sigpendi.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
     
    67#include "syscalls.h"
    78
    8 int __sigpending (sigset_t *set)
     9int _STD(sigpending) (sigset_t *set)
    910{
    1011  thread_data *tp;
  • trunk/src/emx/src/lib/sys/sigprocmask.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/sigprocm.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
     
    78#include "syscalls.h"
    89
    9 int __sigprocmask (int how, const sigset_t *iset, sigset_t *oset)
     10int _STD(sigprocmask) (int how, const sigset_t *iset, sigset_t *oset)
    1011{
    1112  thread_data *tp;
  • trunk/src/emx/src/lib/sys/sigsuspend.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/sigsuspe.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSEXCEPTIONS
    45#include <os2emx.h>
     
    78#include "syscalls.h"
    89
    9 int __sigsuspend (const sigset_t *mask)
     10int _STD(sigsuspend) (const sigset_t *mask)
    1011{
    1112  sigset_t old_blocked;
     
    1617  old_blocked = tp->sig_blocked;
    1718  SET_BLOCKED (tp, *mask);
    18   __pause ();
     19  pause ();
    1920  tp->sig_blocked = old_blocked;
    2021  errno = EINTR;
  • trunk/src/emx/src/lib/sys/sleep.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/sleep.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#define INCL_DOSMISC
    45#define INCL_DOSPROCESS
     
    78#include "syscalls.h"
    89
    9 unsigned __sleep (unsigned sec)
     10unsigned _STD(sleep) (unsigned sec)
    1011{
    1112  if (sec == 0)
  • trunk/src/emx/src/lib/sys/sleep2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    66#include "syscalls.h"
    77
    8 unsigned __sleep2 (unsigned millisec)
     8unsigned _sleep2 (unsigned millisec)
    99{
    1010  DosSleep (millisec);
  • trunk/src/emx/src/lib/sys/sys.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    88.TARGET := sys$A
    99.TSRC.386 := $(wildcard src/lib/sys/386/*.s)
    10 .TSRC   := $(wildcard src/lib/sys/*.c)
     10.TSRC   := $(.TSRC.$(CPU)) $(wildcard src/lib/sys/*.c)
    1111.TCF.src/lib/sys/heapsize.c := -DHEAPSIZE=0x2000000
    1212.INSDIR = lib/
  • trunk/src/emx/src/lib/sys/uflags.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/uflags.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include "syscalls.h"
    45
    5 int __uflags (int mask, int new_flags)
     6int _STD(uflags) (int mask, int new_flags)
    67{
    78  int ret;
  • trunk/src/emx/src/lib/sys/umask.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* sys/umask.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <emx/syscalls.h>
    45#include "syscalls.h"
    56
    6 
    7 int __umask (int pmode)
     7int _STD(umask) (int pmode)
    88{
    99  int old;
  • trunk/src/emx/src/lib/termios/tcdrain.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    66int _tcdrain (int handle)
    77{
    8   return _ioctl (handle, TCSBRK, 1);
     8  return ioctl (handle, TCSBRK, 1);
    99}
  • trunk/src/emx/src/lib/termios/tcflow.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    66int _tcflow (int handle, int action)
    77{
    8   return _ioctl (handle, TCXONC, action);
     8  return ioctl (handle, TCXONC, action);
    99}
  • trunk/src/emx/src/lib/termios/tcflush.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    66int _tcflush (int handle, int queue)
    77{
    8   return _ioctl (handle, TCFLSH, queue);
     8  return ioctl (handle, TCFLSH, queue);
    99}
  • trunk/src/emx/src/lib/termios/tcgetatt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    66int _tcgetattr (int handle, struct termios *ptermios)
    77{
    8   return _ioctl (handle, _TCGA, ptermios);
     8  return ioctl (handle, _TCGA, ptermios);
    99}
  • trunk/src/emx/src/lib/termios/tcsendbr.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    77int _tcsendbreak (int handle, int duration)
    88{
    9   return _ioctl (handle, TCSBRK, duration);
     9  return ioctl (handle, TCSBRK, duration);
    1010}
  • trunk/src/emx/src/lib/termios/tcsetatt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    2424      return -1;
    2525    }
    26   return _ioctl (handle, request, ptermios);
     26  return ioctl (handle, request, ptermios);
    2727}
  • trunk/src/emx/src/lib/time/asctime.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* asctime.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <string.h>
    45#include <time.h>
     
    1011#define digit(i) (char)(((i)%10)+'0')
    1112
    12 char *asctime (const struct tm *t)
     13char *_STD(asctime) (const struct tm *t)
    1314{
    1415#if defined (__MT__)
  • trunk/src/emx/src/lib/time/ctime.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* ctime.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <emx/time.h>
    56
    6 char *ctime (const time_t *t)
     7char *_STD(ctime) (const time_t *t)
    78{
    89  struct tm tmp, *x;
  • trunk/src/emx/src/lib/time/difftime.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* difftime.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45
    5 double difftime (time_t t1, time_t t0)
     6double _STD(difftime) (time_t t1, time_t t0)
    67{
    78  return (double)t1 - (double)t0;
  • trunk/src/emx/src/lib/time/ftime.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* ftime.c (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/timeb.h>
    45#include <time.h>
     
    67#include <emx/syscalls.h>
    78
    8 void ftime (struct timeb *ptr)
     9void _STD(ftime) (struct timeb *ptr)
    910{
    1011  time_t t_loc;
    1112
    12   if (!_tzset_flag) tzset ();
     13  if (!_tzset_flag) _tzset ();
    1314  __ftime (ptr);
    1415  t_loc = ptr->time;
  • trunk/src/emx/src/lib/time/gettimeo.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* gettimeo.c (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/timeb.h>
    45#include <time.h>
     
    78#include <emx/syscalls.h>
    89
    9 int gettimeofday (struct timeval *tp, struct timezone *tzp)
     10int _STD(gettimeofday) (struct timeval *tp, struct timezone *tzp)
    1011{
    1112  struct timeb tb;
  • trunk/src/emx/src/lib/time/gmtime.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* gmtime.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <time.h>
     
    67#include <emx/time.h>
    78
    8 struct tm *gmtime (const time_t *t)
     9struct tm *_STD(gmtime) (const time_t *t)
    910{
    1011#if defined (__MT__)
     
    5253  {
    5354    int i;
    54     const int *p;
     55    const unsigned short *p;
    5556
    5657    p = (_leap_year (dst->tm_year + 1900)
  • trunk/src/emx/src/lib/time/gmtloc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    2626
    2727static int switch_day (int month, int week, int day, int ywday,
    28                        const int *month_table)
     28                       const unsigned short *month_table)
    2929{
    3030  int d, wday;
     
    6060{
    6161  int y, i, ywday, d_year, d_start, d_end;
    62   const int *month_table;
     62  const unsigned short *month_table;
    6363  time_t t_year, t_start, t_end;
    6464
     
    7474
    7575  i = 0;
    76   for (y = 0; _year_day[y] != INT_MAX; ++y)
     76  for (y = 0; _year_day[y] != USHRT_MAX; ++y)
    7777    {
    7878      month_table = (_leap_year (y + 1970)
  • trunk/src/emx/src/lib/time/localtim.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* localtim.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <emx/thread.h>
    56#include <emx/time.h>
    67
    7 struct tm *localtime (const time_t *t)
     8struct tm *_STD(localtime) (const time_t *t)
    89{
    910#if defined (__MT__)
     
    2223  struct tm *p;
    2324
    24   if (!_tzset_flag) tzset ();
     25  if (!_tzset_flag) _tzset ();
    2526  lt = *t;
    2627  isdst = _gmt2loc (&lt);
  • trunk/src/emx/src/lib/time/mktime.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* mktime.c (emx+gcc) -- Copyright (c) 1990-1999 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <limits.h>
    56#include <emx/time.h>
    67
    7 time_t mktime (struct tm *t)
     8time_t _STD(mktime) (struct tm *t)
    89{
    910  time_t t1, t2;
     
    1112  int dst;
    1213
    13   if (!_tzset_flag) tzset ();
     14  if (!_tzset_flag) _tzset ();
    1415
    15   /* mktime() requires that tm_mon is in range.  The other members
     16  /* _mktime() requires that tm_mon is in range.  The other members
    1617     are not restricted. */
    1718
     
    4142  if (dst == -1)
    4243    return (time_t)-1;
    43  
     44
    4445  if (_gmtime (&tmp, &t2) == NULL)
    4546    return (time_t)-1;
  • trunk/src/emx/src/lib/time/settimeo.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* settimeo.c (emx+gcc) -- Copyright (c) 1995-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <sys/time.h>
     
    78#include <emx/syscalls.h>
    89
    9 int settimeofday (const struct timeval *tp, const struct timezone *tzp)
     10int _STD(settimeofday) (const struct timeval *tp, const struct timezone *tzp)
    1011{
    1112  struct timeval local;
     
    1718      return -1;
    1819    }
    19   if (!_tzset_flag) tzset ();
     20  if (!_tzset_flag) _tzset ();
    2021  t = tp->tv_sec;
    2122  local.tv_sec = _gmt2loc (&t);
  • trunk/src/emx/src/lib/time/strftime.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    11/* strftime.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    9495
    9596
    96 size_t strftime (char *string, size_t size, const char *format,
    97                  const struct tm *t)
     97size_t _STD(strftime) (char *string, size_t size, const char *format,
     98  const struct tm *t)
    9899{
    99100  size_t i, n;
  • trunk/src/emx/src/lib/time/strptime.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* strptime.c (emx+gcc) -- Copyright (c) 1994-1998 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <stdlib.h>
    45#include <string.h>
     
    265266
    266267
    267 char *strptime (const char *buf, const char *format, struct tm *tm)
     268char *_STD(strptime) (const char *buf, const char *format, struct tm *tm)
    268269{
    269270  return (char *)parse_fmt ((const unsigned char *)buf,
  • trunk/src/emx/src/lib/time/time.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* time.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <sys/timeb.h>
    45#include <time.h>
    56
    6 time_t time (time_t *t)
     7time_t _STD(time) (time_t *t)
    78{
    89  struct timeb tb;
  • trunk/src/emx/src/lib/time/times.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    11/* times.c (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes */
    22
     3#include "libc-alias.h"
    34#include <time.h>
    45#include <sys/time.h>
     
    78/* Note: return value overflows */
    89
    9 long times (struct tms *buffer)
     10long _STD(times) (struct tms *buffer)
    1011{
    1112  struct timeval tv;
  • trunk/src/emx/src/lib/time/timetabs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r145 r146  
    77   through 2106 */
    88
    9 int const _year_day[_YEARS+1] =
     9unsigned short const _year_day[_YEARS+1] =
    1010{
    1111  0, 365, 730, 1096, 1461, 1826, 2191, 2557, 2922, 3287, 3652, 4018,
     
    2323  41638, 42004, 42369, 42734, 43099, 43465, 43830, 44195, 44560,
    2424  44926, 45291, 45656, 46021, 46387, 46752, 47117, 47482, 47847,
    25   48212, 48577, 48942, 49308, 49673, INT_MAX
     25  48212, 48577, 48942, 49308, 49673, USHRT_MAX
    2626};
    2727
     
    3030   December. */
    3131
    32 int const _month_day_non_leap[] =
    33   {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, INT_MAX};
     32unsigned short const _month_day_non_leap[] =
     33  {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, USHRT_MAX};
    3434
    35 int const _month_day_leap[] =
    36   {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, INT_MAX};
     35unsigned short const _month_day_leap[] =
     36  {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, USHRT_MAX};
  • trunk/src/emx/src/lib/time/tzset.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r145 r146  
    22/*                      Copyright (c) 1996 by Eberhard Mattes */
    33
     4#include "libc-alias.h"
    45#include <stdlib.h>
    56#include <string.h>
     
    105106
    106107
    107 void tzset (void)
     108void _STD(tzset) (void)
    108109{
    109110  struct _tzinfo ntz;
Note: See TracChangeset for help on using the changeset viewer.