Commit graph

131 commits

Author SHA1 Message Date
Antoine Leca 6d8d7a88b2 libc!setmode.c: Avoid #if inside macro call
#if inside macro call is undefined behaviour under the C standard
(3.8.3 paragraph 10 for C90, 6.8.10 paragraph 11 for C99).
The same effect can be achieved with a slightly more verbose construct,
putting the whole macro call inside the #ifdef/#else/#endif.
2011-06-23 17:54:17 +02:00
Ben Gras c02833ced6 <timers.h> - add feature to time a code block
. also minor compile fixes for it
2011-06-06 09:04:11 +02:00
Dirk Vogt 0908191386 _mount.c: don't check for excutable if MS_EXISTING is set 2011-02-22 17:59:08 +00:00
Ben Gras dee29bbd3c some extra math functions from netbsd for netpbm. 2011-01-30 23:40:51 +00:00
Ben Gras dc1cc91df1 <ansi.h> -> <minix/ansi.h> 2011-01-28 11:35:02 +00:00
Arun Thomas 4fe0dfa9aa libc and csu updates for ELF 2010-12-10 23:04:04 +00:00
Arun Thomas d824b54d82 csu/build support for ELF 2010-12-10 22:20:12 +00:00
Dirk Vogt 9ed280d1ec decouple file system server start/termination from mount/umount 2010-11-23 19:34:56 +00:00
Arun Thomas 7a4149a3f5 For GCC/clang, don't build in ACK int64 routines 2010-11-19 12:36:44 +00:00
Tomas Hruby 504abf4b34 Inlining 64bit integer handling functions
- if gcc/clang is used the C functions that use long long can be
  inlined to get better performance (yes, it makes difference)
2010-11-18 16:37:40 +00:00
Arun Thomas f0ab18377d GCC/clang: int64 routines in C 2010-11-12 18:38:10 +00:00
Arun Thomas aaaad89244 Use int64 functions consistently
Instead of manipulating the u64_t type directly, use the
ex64hi()/ex64lo()/make64() functions.
2010-11-07 23:35:29 +00:00
Arun Thomas 998af6f111 Move minix/paths.h to paths.h
Also, merge in relevant macros from NetBSD
2010-11-06 20:40:15 +00:00
Ben Gras efcfaf4b96 stdio: split vsprintf and vsnprintf
- workaround for linking problems
2010-11-02 22:05:40 +00:00
Ben Gras 51d9144e9f stdio/freopen.c: fill __iotab table with stream pointer
- lets fclose()d and then freopen()ed streams be fclose()d again
    without error
2010-11-02 22:02:50 +00:00
Ben Gras 09569d399f stdio/fclose.c: reset _buf
- if the stream gets freopen()ed, avoid buffer being seen as valid
2010-11-02 22:01:47 +00:00
Erik van der Kouwe ada0b4ca04 Fix warnings due to missing __dead attribute on exit 2010-10-05 07:25:47 +00:00
Tomas Hruby 74c5cd7668 The profile utility can set the sprofiling mode
- profile --nmi | --rtc sets the profiling mode

- --rtc is default, uses BIOS RTC, cannot profile kernel the presetted
  frequency values apply

- --nmi is only available in APIC mode as it uses the NMI watchdog, -f
  allows any frequency in Hz

- both modes use compatible data structures
2010-09-23 10:49:42 +00:00
David van Moolenbroek 354da24f5b make getsysinfo() a system-land call 2010-09-14 21:50:05 +00:00
David van Moolenbroek d7b10963c2 make library calls use ProcFS 2010-09-14 21:28:34 +00:00
Ben Gras a5a8c57fe7 add EHOSTDOWN errno. 2010-09-14 11:51:41 +00:00
Ben Gras 23311d9819 lib: fixes to make clang not error 2010-09-13 15:50:54 +00:00
David van Moolenbroek d29833c5aa remove hardcoding of system.conf path in various service calls 2010-09-10 09:22:22 +00:00
Erik van der Kouwe 5cc29a6c7e Make realpath deal with double slashes 2010-09-06 07:45:32 +00:00
Thomas Veerman e8ddc0f46e - Add support for file descriptor passing to PFS.
- For security reasons move some libc code to PFS.
- Fix a few bugs in PFS.
Contributed by Thomas Cort.
2010-08-30 13:46:44 +00:00
Thomas Veerman 2297e26660 Prepare headers to support file descriptor passing over UNIX Domain Sockets.
Contributed by Thomas Cort.
2010-08-30 13:41:22 +00:00
Ben Gras 5d6c2aae0a gcov support, based on work contributed by Anton Kuijsten. 2010-08-25 13:06:43 +00:00
Arun Thomas de231a713e Move MIN() and MAX() macros to sys/params.h 2010-08-21 13:10:41 +00:00
Erik van der Kouwe 292f98dc29 Minor malloc-debug fixes 2010-08-20 19:50:36 +00:00
Erik van der Kouwe 2a736d0c2e Add MALLOC_DEBUG env var to debug applications using malloc 2010-08-20 19:16:31 +00:00
Erik van der Kouwe b337d3f8e5 move rrrrrrread_tsc from libsys to libc so anyone can use it 2010-08-20 18:43:56 +00:00
Arun Thomas 9a21d1a2fd Macros for symbols used in both ASM and C
-The macros take care of prepending the leading underscore when
 necessary.
2010-08-17 16:44:07 +00:00
Erik van der Kouwe 551374c228 Add ftello function 2010-08-16 17:07:40 +00:00
Erik van der Kouwe a3e4dcafe0 Add fseeko function 2010-08-16 17:06:08 +00:00
Erik van der Kouwe a719ab7780 Auto-detect ext2 partitions in mount 2010-08-03 06:28:58 +00:00
Ben Gras 05bbf81f93 new EPFNOSUPPORT errno 2010-07-28 16:32:21 +00:00
Arun Thomas ee1cabf06c Import poll() from NetBSD's libnbcompat 2010-07-26 20:46:04 +00:00
Ben Gras 541b5c5c38 inet_pton(), patched by Thomas Cort. 2010-07-26 14:47:10 +00:00
Ben Gras 9f0364df60 lib - sanity check for group_from_gid etc. 2010-07-24 10:40:55 +00:00
Ben Gras 34a58c8d82 inet_ntop, contributed by Thomas Cort. 2010-07-23 09:54:47 +00:00
Erik van der Kouwe f389ad2655 Move sensitive instructions from libc into kernel 2010-07-23 07:12:47 +00:00
Erik van der Kouwe a06e5c383d Throw out ins[bwl] and out[bwl] from libc as they are not used 2010-07-23 07:10:47 +00:00
Ben Gras c4bb6abc2b vsprintf: fix special yet useful case for vsprintf where n < 1.
reported by jaldhar.
2010-07-22 22:35:44 +00:00
Ben Gras ffe7e9166e lib - extra file for libutil; strnstr and strcasestr from freebsd for libc. 2010-07-19 10:46:26 +00:00
Ben Gras 09c18bc918 lib: bugfix for mbstowcs, debugged by Gautam Tirumala. 2010-07-18 20:57:55 +00:00
Ben Gras 4aca722796 lib - link in new u64 functions. 2010-07-16 00:12:51 +00:00
Ben Gras 6c66933f90 64-bit bitwise manipulation functions, by Gautam Tirumala. 2010-07-15 23:48:56 +00:00
Thomas Veerman f531dba2d2 Add support for UNIX Domain Sockets to the C lib. Contributed by Thomas Cort 2010-07-15 14:05:23 +00:00
Thomas Veerman ecc8a52f82 Add getnucred system call. Contributed by Thomas Cort 2010-07-15 13:24:57 +00:00
Thomas Veerman ca0bed1400 Add EOVERFLOW error condition 2010-07-15 12:36:41 +00:00