# $NetBSD: varmod-order-numeric.mk,v 1.8 2022/09/27 19:18:45 rillig Exp $ # # Tests for the variable modifiers ':On', which returns the words, sorted in # ascending numeric order, and for ':Orn' and ':Onr', which additionally # reverse the order. # # The variable modifiers ':On', ':Onr' and ':Orn' were added in var.c 1.939 # from 2021-07-30. # This list contains only 32-bit numbers since the make code needs to conform # to C90, which does not necessarily provide integer types larger than 32 bit. # Make uses 'long long' for C99 or later, and 'long' for older C versions. # # To get 53-bit integers even in C90, it would be possible to switch to # 'double' instead, but that would allow floating-point numbers as well, which # is out of scope for this variable modifier. NUMBERS= 3 5 7 1 42 -42 5K -3m 1M 1k -2G .if ${NUMBERS:On} != "-2G -3m -42 1 3 5 7 42 1k 5K 1M" . error ${NUMBERS:On} .endif .if ${NUMBERS:Orn} != "1M 5K 1k 42 7 5 3 1 -42 -3m -2G" . error ${NUMBERS:Orn} .endif # Both ':Onr' and ':Orn' have the same effect. .if ${NUMBERS:Onr} != "1M 5K 1k 42 7 5 3 1 -42 -3m -2G" . error ${NUMBERS:Onr} .endif # Duplicate numbers are preserved in the output. In this case the # equal-valued numbers are spelled the same, so they are indistinguishable in # the output. DUPLICATES= 3 1 2 2 1 1 # subsequence of https://oeis.org/A034002 .if ${DUPLICATES:On} != "1 1 1 2 2 3" . error ${DUPLICATES:On} .endif # If there are several numbers that have the same integer value, they are # returned in unspecified order. SAME_VALUE:= ${:U 79 80 0x0050 81 :On} .if ${SAME_VALUE} != "79 80 0x0050 81" && ${SAME_VALUE} != "79 0x0050 80 81" . error ${SAME_VALUE} .endif # Hexadecimal and octal numbers can be sorted as well. MIXED_BASE= 0 010 0x7 9 .if ${MIXED_BASE:On} != "0 0x7 010 9" . error ${MIXED_BASE:On} .endif # The measurement units for suffixes are k, M, G, but not T. # The string '3T' evaluates to 3, the string 'x' evaluates as '0'. .if ${4 3T 2M x:L:On} != "x 3T 4 2M" . error .endif all: g/sys?h=lockcount-9.3'>sys/dev/filemon
AgeCommit message (Expand)Author
2018-06-06Remove duplicate ;maya
2017-11-30add fo_name so we can identify the fileops in a simple way.christos
2016-01-11Take a reference on the (activity log) file itself, and not on thepgoyette
2016-01-09When following process parent pointers, lock the new (parent) beforepgoyette
2016-01-08Don't release the proc_lock mutex until we're finished using the stuffpgoyette
2016-01-08typo in debug printdholland
2016-01-05KNF - blank line after (non-existant) declarations. No functional change.pgoyette
2016-01-05Although not recommended, it is possible to include filemon(4) as apgoyette
2015-11-25Be a bit more paranoid about hijacking (and restoring) syscall functionpgoyette
2015-11-24Add missing /* $NetBSD$ */ keywordpgoyette
2015-11-24finish previous - remove no-longer-used variablespgoyette
2015-11-23Remove the requirement that the target (tracked) process be a descendantpgoyette
2015-11-23Clean up the error paths in filemon_ioctl(), making sure to release thepgoyette
2015-11-23Retrieve the pathname of the exec'd file before we call sys_execve().pgoyette
2015-11-22Fix return-code handling for execve and chdir wrappers.pgoyette
2015-11-21If a second call to the SET_FD ioctl occurs, release the reference wepgoyette
2015-11-21The correct default return value from a module's xxx_modcmd() routinepgoyette
2015-11-20Ensure that the PID specified in the FILEMON_SET_PID ioctl() callpgoyette
2015-11-20Remove extra ')' (bad cut&paste)pgoyette
2015-11-20Don't allow setting the PID-to-trace if the target has a non-nativepgoyette
2015-11-20Install wrapper functions only in native emulation.pgoyette
2015-11-20Don't initialize twice.pgoyette
2015-09-06More on PR 41200: headers that declare ioctls should include sys/ioccom.h.dholland
2015-08-20include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.christos
2015-06-17Bump version due to openatsjg
2015-06-15staircase flattening police.christos
2015-06-15Latest clang uses openat, filemon thus needs to handle it.sjg
2015-05-30Improve wording.joerg
2015-05-21Avoid dereferencing NULL tp crashing the kernel (brad harder)christos
2014-07-25Add d_discard to all struct cdevsw instances I could find.dholland
2014-03-27remove a bunch of repetitive code by introducing filemon_printf.christos
2014-03-16Change (mostly mechanically) every cdevsw/bdevsw I can find to usedholland
2012-11-19filemon_pid_check:sjg
2012-06-20Install filemon.hsjg
2011-10-15Add the plumbing so one could compile filemon(4) into a kernel.sjg
2011-09-24For files opened O_RDWR, output an R record as well as Wsjg
2011-07-04Set FILEMON_VERSION to 3sjg
2011-05-13filemon_open: remove unnecessary check (which has a leak in error path).rmind
2011-03-13EJUSTRETURN is expected return from sys_execve()sjg
2010-09-09First cut of simple syscall wrapper, which make(1) can usesjg