Changes in uspace/lib/posix/source/stdlib.c [a3da2b2:d856110] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/stdlib.c
ra3da2b2 rd856110 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.