source: EcnlProtoTool/trunk/prototool/src/libbb/libbb.c@ 321

Last change on this file since 321 was 321, checked in by coas-nagasima, 7 years ago

文字コードを設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 834 bytes
Line 
1#include "libbb.h"
2
3const char *applet_name;
4
5void bb_show_usage(void) { xfunc_die(); }
6void FAST_FUNC kill_myself_with_sig(int sig){ abort(); }
7void BUG_sizeof(void) { abort(); }
8
9static unsigned long long ret_ERANGE(void)
10{
11 errno = ERANGE; /* this ain't as small as it looks (on glibc) */
12 return ULLONG_MAX;
13}
14
15static unsigned long long handle_errors(unsigned long long v, char **endp)
16{
17 char next_ch = **endp;
18
19 /* errno is already set to ERANGE by strtoXXX if value overflowed */
20 if (next_ch) {
21 /* "1234abcg" or out-of-range? */
22 if (isalnum(next_ch) || errno)
23 return ret_ERANGE();
24 /* good number, just suspicious terminator */
25 errno = EINVAL;
26 }
27 return v;
28}
29
30char* FAST_FUNC uid2uname_utoa(uid_t uid)
31{
32 errno = ENOSYS;
33 return NULL;
34}
35
36char* FAST_FUNC gid2group_utoa(gid_t gid)
37{
38 errno = ENOSYS;
39 return NULL;
40}
Note: See TracBrowser for help on using the repository browser.