Changeset 2029
- Timestamp:
- Jun 13, 2005, 11:51:56 PM (20 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 1 added
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/ChangeLog.LIBC
-
Property cvs2svn:cvs-rev
changed from
1.55
to1.56
r2028 r2029 6 6 o Fixed potential deadlock the first time a must-complete 7 7 fmutex was entered. 8 o Replaced mktemp and mkstemp with BSD versions. Also adding 9 mkstemps, mkdtemp, arc4random, arc4random_addrandom and 10 arc4random_stir. 8 11 9 12 2005-06-12: knut st. osmundsen <bird-gccos2-spam@anduin.net> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/stdlib.h
-
Property cvs2svn:cvs-rev
changed from
1.33
to1.34
r2028 r2029 241 241 #endif 242 242 243 /** @todo__uint32_t244 arc4random(void); */245 /** @todo void arc4random_addrandom(unsigned char *dat, int datlen); */ 246 /** @todo void arc4random_stir(void); */ 243 __uint32_t 244 arc4random(void); 245 void arc4random_addrandom(unsigned char *dat, int datlen); 246 void arc4random_stir(void); 247 247 char *getbsize(int *, long *); 248 248 /* getcap(3) functions */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/unistd.h
-
Property cvs2svn:cvs-rev
changed from
1.28
to1.29
r2028 r2029 501 501 /** @todo int iruserok_sa(const void *, int, int, const char *, const char *); */ 502 502 int issetugid(void); 503 /** @todo char *mkdtemp(char *); */ 503 char *mkdtemp(char *); 504 504 int mknod(const char *, mode_t, dev_t); 505 505 #ifndef _MKSTEMP_DECLARED … … 507 507 #define _MKSTEMP_DECLARED 508 508 #endif 509 /** @todo int mkstemps(char *, int); */ 509 int mkstemps(char *, int); 510 510 #ifndef _MKTEMP_DECLARED 511 511 char *mktemp(char *); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/gen/arc4random.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2028 r2029 33 33 #include <fcntl.h> 34 34 #include <unistd.h> 35 #ifdef __EMX__ 36 #include <sys/fmutex.h> 37 #else 35 38 #include <pthread.h> 39 #endif 36 40 37 41 #include "libc_private.h" … … 44 48 }; 45 49 50 #ifdef __EMX__ 51 static _fmutex arc4random_mtx = _FMUTEX_INITIALIZER; 52 #else 46 53 static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; 54 #endif 47 55 48 56 #define RANDOMDEV "/dev/urandom" 57 #ifdef __EMX__ 58 #define THREAD_LOCK() _fmutex_request(&arc4random_mtx, 0) 59 #define THREAD_UNLOCK() _fmutex_release(&arc4random_mtx) 60 #else /* !__EMX__ */ 49 61 #define THREAD_LOCK() \ 50 62 do { \ … … 58 70 _pthread_mutex_unlock(&arc4random_mtx); \ 59 71 } while (0) 72 #endif 60 73 61 74 static struct arc4_stream rs; … … 114 127 (void) _read(fd, rdat.rnd, sizeof(rdat.rnd)); 115 128 _close(fd); 116 } 129 } 117 130 /* fd < 0? Ah, what the heck. We'll just take whatever was on the 118 131 * stack... */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/bsd/stdio/mktemp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2028 r2029 58 58 59 59 int 60 mkstemps(path, slen)60 _STD(mkstemps)(path, slen) 61 61 char *path; 62 62 int slen; … … 68 68 69 69 int 70 mkstemp(path)70 _STD(mkstemp)(path) 71 71 char *path; 72 72 { … … 76 76 } 77 77 78 /* mkstd.awk: NOUNDERSCORE(mkdtemp) */ 78 79 char * 79 mkdtemp(path)80 _STD(mkdtemp)(path) 80 81 char *path; 81 82 { … … 90 91 } 91 92 93 #ifndef __EMX__ 92 94 __warn_references(mktemp, 93 95 "warning: mktemp() possibly used unsafely; consider using mkstemp()"); 96 #endif 94 97 95 98 char * 96 mktemp(path)99 _STD(mktemp)(path) 97 100 char *path; 98 101 { … … 174 177 if (*trv == '\0' || trv == suffp) 175 178 return (0); 176 pad = strchr( padchar, *trv);179 pad = strchr((const char *)padchar, *trv); 177 180 if (pad == NULL || *++pad == '\0') 178 181 *trv++ = padchar[0]; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.114
to1.115
r2028 r2029 1712 1712 "___infinity" @1716 1713 1713 "___nan" @1717 1714 ; mktemp + arc4random 1715 "_arc4random" @1718 1716 "_arc4random_addrandom" @1719 1717 "_arc4random_stir" @1720 1718 "__mktemp" @1721 1719 "__std_mkdtemp" @1722 1720 "__std_mkstemps" @1723 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.