瀏覽代碼

Hide setstate_r, test

Peter S. Mazinger 19 年之前
父節點
當前提交
f3d0a06707
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      libc/stdlib/random.c
  2. 2 1
      libc/stdlib/random_r.c

+ 1 - 0
libc/stdlib/random.c

@@ -24,6 +24,7 @@
 
 
 #define random_r __random_r
 #define random_r __random_r
 #define srandom_r __srandom_r
 #define srandom_r __srandom_r
+#define setstate_r __setstate_r
 
 
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <features.h>
 #include <features.h>

+ 2 - 1
libc/stdlib/random_r.c

@@ -319,7 +319,7 @@ fail:
    to the order in which things are done, it is OK to call setstate with the
    to the order in which things are done, it is OK to call setstate with the
    same state as the current state
    same state as the current state
    Returns a pointer to the old state information.  */
    Returns a pointer to the old state information.  */
-int setstate_r (char *arg_state, struct random_data *buf)
+int attribute_hidden __setstate_r (char *arg_state, struct random_data *buf)
 {
 {
     int32_t *new_state = 1 + (int32_t *) arg_state;
     int32_t *new_state = 1 + (int32_t *) arg_state;
     int type;
     int type;
@@ -362,3 +362,4 @@ fail:
     __set_errno (EINVAL);
     __set_errno (EINVAL);
     return -1;
     return -1;
 }
 }
+strong_alias(__setstate_r,setstate_r)