comparison src/vm-limit.c @ 109480:d12162869c07

Convert some more functions to standard C. * lib-src/emacsclient.c (get_current_dir_name, w32_get_resource) (w32_getenv, w32_set_user_model_id, w32_window_app, w32_execvp) (close_winsock, initialize_sockets, w32_find_emacs_process) (w32_give_focus): * lib-src/ntlib.c (getlogin, getuid, getgid, getegid): * nt/addpm.c (add_registry, main): * nt/cmdproxy.c (get_env_size): * nt/ddeclient.c (main): * nt/runemacs.c (set_user_model_id): * src/alloc.c (emacs_blocked_free, emacs_blocked_malloc) (emacs_blocked_realloc, uninterrupt_malloc): * src/fringe.c (w32_reset_fringes): * src/image.c (convert_mono_to_color_image, lookup_rgb_color) (init_color_table, XPutPixel, jpeg_resync_to_restart_wrapper): * src/sound.c (be2hs, do_play_sound): * src/vm-limit.c (get_lim_data, ret_lim_data): * src/w32term.c (x_free_frame_resources): * src/xfaces.c (x_create_gc, x_free_gc): Convert definitions to standard C.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 20 Jul 2010 22:21:03 +0200
parents e856a274549b
children 68ca98ae70fb
comparison
equal deleted inserted replaced
109479:a2fe058b3eb2 109480:d12162869c07
67 #else /* not HAVE_GETRLIMIT */ 67 #else /* not HAVE_GETRLIMIT */
68 68
69 #ifdef USG 69 #ifdef USG
70 70
71 static void 71 static void
72 get_lim_data () 72 get_lim_data (void)
73 { 73 {
74 extern long ulimit (); 74 extern long ulimit ();
75 75
76 lim_data = -1; 76 lim_data = -1;
77 77
91 91
92 #else /* not USG */ 92 #else /* not USG */
93 #ifdef WINDOWSNT 93 #ifdef WINDOWSNT
94 94
95 static void 95 static void
96 get_lim_data () 96 get_lim_data (void)
97 { 97 {
98 extern unsigned long reserved_heap_size; 98 extern unsigned long reserved_heap_size;
99 lim_data = reserved_heap_size; 99 lim_data = reserved_heap_size;
100 } 100 }
101 101
102 #else 102 #else
103 #if !defined (BSD4_2) && !defined (__osf__) 103 #if !defined (BSD4_2) && !defined (__osf__)
104 104
105 #ifdef MSDOS 105 #ifdef MSDOS
106 void 106 void
107 get_lim_data () 107 get_lim_data (void)
108 { 108 {
109 _go32_dpmi_meminfo info; 109 _go32_dpmi_meminfo info;
110 unsigned long lim1, lim2; 110 unsigned long lim1, lim2;
111 111
112 _go32_dpmi_get_free_memory_information (&info); 112 _go32_dpmi_get_free_memory_information (&info);
133 if (lim_data > 512U * 1024U * 1024U) 133 if (lim_data > 512U * 1024U * 1024U)
134 lim_data = 512U * 1024U * 1024U; 134 lim_data = 512U * 1024U * 1024U;
135 } 135 }
136 136
137 unsigned long 137 unsigned long
138 ret_lim_data () 138 ret_lim_data (void)
139 { 139 {
140 get_lim_data (); 140 get_lim_data ();
141 return lim_data; 141 return lim_data;
142 } 142 }
143 #else /* not MSDOS */ 143 #else /* not MSDOS */
144 static void 144 static void
145 get_lim_data () 145 get_lim_data (void)
146 { 146 {
147 lim_data = vlimit (LIM_DATA, -1); 147 lim_data = vlimit (LIM_DATA, -1);
148 } 148 }
149 #endif /* not MSDOS */ 149 #endif /* not MSDOS */
150 150
151 #else /* BSD4_2 */ 151 #else /* BSD4_2 */
152 152
153 static void 153 static void
154 get_lim_data () 154 get_lim_data (void)
155 { 155 {
156 struct rlimit XXrlimit; 156 struct rlimit XXrlimit;
157 157
158 getrlimit (RLIMIT_DATA, &XXrlimit); 158 getrlimit (RLIMIT_DATA, &XXrlimit);
159 #ifdef RLIM_INFINITY 159 #ifdef RLIM_INFINITY