@@ -623,10 +623,10 @@ class Timezone extends Structure {
623
623
* The sysctl() function retrieves system information and allows processes with
624
624
* appropriate privileges to set system information. The information available
625
625
* from sysctl() consists of integers, strings, and tables.
626
- *
626
+ * <p>
627
627
* The state is described using a "Management Information Base" (MIB) style
628
628
* name, listed in name, which is a namelen length array of integers.
629
- *
629
+ * <p>
630
630
* The information is copied into the buffer specified by oldp. The size of the
631
631
* buffer is given by the location specified by oldlenp before the call, and
632
632
* that location gives the amount of data copied after a successful call and
@@ -635,32 +635,41 @@ class Timezone extends Structure {
635
635
* as much data as fits in the buffer provided and returns with the error code
636
636
* ENOMEM. If the old value is not desired, oldp and oldlenp should be set to
637
637
* NULL.
638
- *
638
+ * <p>
639
639
* The size of the available data can be determined by calling sysctl() with the
640
640
* NULL argument for oldp. The size of the available data will be returned in
641
641
* the location pointed to by oldlenp. For some operations, the amount of space
642
642
* may change often. For these operations, the system attempts to round up so
643
643
* that the returned size is large enough for a call to return the data shortly
644
644
* thereafter.
645
- *
645
+ * <p>
646
646
* To set a new value, newp is set to point to a buffer of length newlen from
647
647
* which the requested value is to be taken. If a new value is not to be set,
648
648
* newp should be set to NULL and newlen set to 0.
649
649
*
650
650
* @param name
651
- * MIB array of integers
651
+ * a Management Information Base ( MIB) array of integers
652
652
* @param namelen
653
- * length of the MIB array
653
+ * the length of the array in {@code name}
654
654
* @param oldp
655
- * Information retrieved
655
+ * A buffer to hold the information retrieved
656
656
* @param oldlenp
657
- * Size of information retrieved
657
+ * Size of the buffer, a pointer to a {@link size_t} value
658
658
* @param newp
659
- * Information to be written
659
+ * To set a new value, a buffer of information to be written. May be
660
+ * null if no value is to be set.
660
661
* @param newlen
661
- * Size of information to be written
662
+ * Size of the information to be written. May be 0 if no value is to
663
+ * be set.
662
664
* @return 0 on success; sets errno on failure
663
665
*/
666
+ int sysctl (int [] name , int namelen , Pointer oldp , Pointer oldlenp , Pointer newp , size_t newlen );
667
+
668
+ /**
669
+ * @deprecated Use
670
+ * {@link #sysctl(int[], int, Pointer, Pointer, Pointer, com.sun.jna.platform.unix.LibCAPI.size_t)}
671
+ */
672
+ @ Deprecated
664
673
int sysctl (int [] name , int namelen , Pointer oldp , IntByReference oldlenp , Pointer newp , int newlen );
665
674
666
675
/**
@@ -671,15 +680,24 @@ class Timezone extends Structure {
671
680
* @param name
672
681
* ASCII representation of the MIB name
673
682
* @param oldp
674
- * Information retrieved
683
+ * A buffer to hold the information retrieved
675
684
* @param oldlenp
676
- * Size of information retrieved
685
+ * Size of the buffer, a pointer to a {@link size_t} value
677
686
* @param newp
678
- * Information to be written
687
+ * To set a new value, a buffer of information to be written. May be
688
+ * null if no value is to be set.
679
689
* @param newlen
680
- * Size of information to be written
690
+ * Size of the information to be written. May be 0 if no value is to
691
+ * be set.
681
692
* @return 0 on success; sets errno on failure
682
693
*/
694
+ int sysctlbyname (String name , Pointer oldp , Pointer oldlenp , Pointer newp , size_t newlen );
695
+
696
+ /**
697
+ * @deprecated Use
698
+ * {@link #sysctlbyname(String, Pointer, Pointer, Pointer, com.sun.jna.platform.unix.LibCAPI.size_t)}
699
+ */
700
+ @ Deprecated
683
701
int sysctlbyname (String name , Pointer oldp , IntByReference oldlenp , Pointer newp , int newlen );
684
702
685
703
/**
@@ -705,12 +723,18 @@ class Timezone extends Structure {
705
723
* ASCII representation of the name
706
724
* @param mibp
707
725
* Integer array containing the corresponding name vector.
708
- * @param size
726
+ * @param sizep
709
727
* On input, number of elements in the returned array; on output, the
710
728
* number of entries copied.
711
729
* @return 0 on success; sets errno on failure
712
730
*/
713
- int sysctlnametomib (String name , Pointer mibp , IntByReference size );
731
+ int sysctlnametomib (String name , Pointer mibp , Pointer sizep );
732
+
733
+ /**
734
+ * @deprecated Use {@link #sysctlnametomib(String, Pointer, Pointer)}
735
+ */
736
+ @ Deprecated
737
+ int sysctlnametomib (String name , Pointer mibp , IntByReference sizep );
714
738
715
739
/**
716
740
* The host_processor_info function returns information about processors.
0 commit comments