Changeset dd0c8a0 in mainline for uspace/lib/posix/source/stdlib.c
- Timestamp:
- 2013-09-29T06:56:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9bd960d
- Parents:
- 3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/stdlib.c
r3deb0155 rdd0c8a0 35 35 36 36 #define LIBPOSIX_INTERNAL 37 #define __POSIX_DEF__(x) posix_##x 37 38 38 39 #include "internal/common.h" … … 62 63 // TODO: low priority, just a compile-time dependency of binutils 63 64 not_implemented(); 65 return 1; 64 66 } 65 67 … … 231 233 // TODO: low priority, just a compile-time dependency of binutils 232 234 not_implemented(); 235 return 0; 233 236 } 234 237 … … 243 246 int posix_system(const char *string) { 244 247 // TODO: does nothing at the moment 248 not_implemented(); 245 249 return 0; 246 250 } … … 387 391 free(ptr); 388 392 } 393 } 394 395 /** 396 * Generate a pseudo random integer in the range 0 to RAND_MAX inclusive. 397 * 398 * @return The pseudo random integer. 399 */ 400 int posix_rand(void) 401 { 402 return (int) random(); 403 } 404 405 /** 406 * Initialize a new sequence of pseudo-random integers. 407 * 408 * @param seed The seed of the new sequence. 409 */ 410 void posix_srand(unsigned int seed) 411 { 412 srandom(seed); 389 413 } 390 414
Note:
See TracChangeset
for help on using the changeset viewer.