Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/onigmo-6.1.3
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/onigmo-6.1.3/src/regposerr.c

    r321 r331  
    11/**********************************************************************
    2   regposerr.c - Oniguruma (regular expression library)
     2  regposerr.c - Onigmo (Oniguruma-mod) (regular expression library)
    33**********************************************************************/
    44/*-
    55 * Copyright (c) 2002-2007  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
     6 * Copyright (c) 2011-2016  K.Takata  <kentkt AT csc DOT jp>
    67 * All rights reserved.
    78 *
     
    2930
    3031#include "config.h"
    31 #include "onigposix.h"
     32#include "onigmoposix.h"
     33#include <string.h>
    3234
    33 #ifdef HAVE_STRING_H
    34 # include <string.h>
     35#if defined(__GNUC__)
     36# define ARG_UNUSED  __attribute__ ((unused))
    3537#else
    36 # include <strings.h>
     38# define ARG_UNUSED
    3739#endif
    3840
    39 #if defined(__GNUC__)
    40 #  define ARG_UNUSED  __attribute__ ((unused))
     41#if defined(_WIN32) && !defined(__GNUC__)
     42# define xsnprintf   sprintf_s
     43# define xstrncpy(dest,src,size)   strncpy_s(dest,size,src,_TRUNCATE)
    4144#else
    42 #  define ARG_UNUSED
     45# define xsnprintf   snprintf
     46# define xstrncpy    strncpy
    4347#endif
    4448
     
    6569  "invalid wide char value",                 /* REG_EONIG_BADWC    */
    6670  "invalid argument",                        /* REG_EONIG_BADARG   */
    67   "multi-thread error"                       /* REG_EONIG_THREAD   */
    6871};
    6972
     
    8790  }
    8891  else {
    89     sprintf(tbuf, "undefined error code (%d)", posix_ecode);
     92    xsnprintf(tbuf, sizeof(tbuf), "undefined error code (%d)", posix_ecode);
    9093    s = tbuf;
    9194  }
     
    9497
    9598  if (buf != NULL && size > 0) {
    96     strncpy(buf, s, size - 1);
     99    xstrncpy(buf, s, size - 1);
    97100    buf[size - 1] = '\0';
    98101  }
Note: See TracChangeset for help on using the changeset viewer.