Skip to content

Commit 694771f

Browse files
author
Christian Seiler
committed
- Fixed comment style.
1 parent 2230e80 commit 694771f

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

Diff for: Zend/acinclude.m4

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
131131
double d = div (2877.0, 1000000.0);
132132
char buf[255];
133133
sprintf(buf, "%.30f", d);
134-
// see if the result is actually in double precision
134+
/* see if the result is actually in double precision */
135135
return strncmp(buf, "0.00287699", 10) == 0 ? 0 : 1;
136136
}
137137
]], [ac_cfp_have__fpu_setcw=yes], [ac_cfp_have__fpu_setcw=no])
@@ -163,7 +163,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
163163
double d = div (2877.0, 1000000.0);
164164
char buf[255];
165165
sprintf(buf, "%.30f", d);
166-
// see if the result is actually in double precision
166+
/* see if the result is actually in double precision */
167167
return strncmp(buf, "0.00287699", 10) == 0 ? 0 : 1;
168168
}
169169
]], [ac_cfp_have_fpsetprec=yes], [ac_cfp_have_fpsetprec=no])
@@ -195,7 +195,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
195195
double d = div (2877.0, 1000000.0);
196196
char buf[255];
197197
sprintf(buf, "%.30f", d);
198-
// see if the result is actually in double precision
198+
/* see if the result is actually in double precision */
199199
return strncmp(buf, "0.00287699", 10) == 0 ? 0 : 1;
200200
}
201201
]], [ac_cfp_have__controlfp=yes], [ac_cfp_have__controlfp=no])
@@ -228,7 +228,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
228228
double d = div (2877.0, 1000000.0);
229229
char buf[255];
230230
sprintf(buf, "%.30f", d);
231-
// see if the result is actually in double precision
231+
/* see if the result is actually in double precision */
232232
return strncmp(buf, "0.00287699", 10) == 0 ? 0 : 1;
233233
}
234234
]], [ac_cfp_have__controlfp_s=yes], [ac_cfp_have__controlfp_s=no])
@@ -263,7 +263,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
263263
double d = div (2877.0, 1000000.0);
264264
char buf[255];
265265
sprintf(buf, "%.30f", d);
266-
// see if the result is actually in double precision
266+
/* see if the result is actually in double precision */
267267
return strncmp(buf, "0.00287699", 10) == 0 ? 0 : 1;
268268
}
269269
]], [ac_cfp_have_fpu_inline_asm_x86=yes], [ac_cfp_have_fpu_inline_asm_x86=no])

Diff for: Zend/zend_float.h

+36-36
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,22 @@
6666
MSVC via compile time define.
6767
*/
6868

69-
// MSVC detection (MSVC people usually don't use autoconf)
69+
/* MSVC detection (MSVC people usually don't use autoconf) */
7070
#ifdef _MSC_VER
7171
# if _MSC_VER >= 1500
72-
// Visual C++ 2008 or higher, supports _controlfp_s
72+
/* Visual C++ 2008 or higher, supports _controlfp_s */
7373
# define HAVE__CONTROLFP_S
7474
# else
75-
// Visual C++ (up to 2005), supports _controlfp
75+
/* Visual C++ (up to 2005), supports _controlfp */
7676
# define HAVE__CONTROLFP
77-
# endif // MSC_VER >= 1500
78-
// Tell MSVC optimizer that we access FP environment
77+
# endif /* MSC_VER >= 1500 */
78+
/* Tell MSVC optimizer that we access FP environment */
7979
# pragma fenv_access (on)
80-
#endif // _MSC_VER
80+
#endif /* _MSC_VER */
8181

8282
#ifdef HAVE__CONTROLFP_S
8383

84-
// float.h defines _controlfp_s
84+
/* float.h defines _controlfp_s */
8585
# include <float.h>
8686

8787
# define XPFPA_DECLARE \
@@ -97,19 +97,19 @@
9797
_xpfpa_fpu_oldcw = _xpfpa_fpu_cw; \
9898
_controlfp_s(&_xpfpa_fpu_cw, _PC_24, _MCW_PC); \
9999
} while (0)
100-
// NOTE: This only sets internal precision. MSVC does NOT support double-
101-
// extended precision!
100+
/* NOTE: This only sets internal precision. MSVC does NOT support double-
101+
extended precision! */
102102
# define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \
103103
_controlfp_s(&_xpfpa_fpu_cw, 0, 0); \
104104
_xpfpa_fpu_oldcw = _xpfpa_fpu_cw; \
105105
_controlfp_s(&_xpfpa_fpu_cw, _PC_64, _MCW_PC); \
106106
} while (0)
107107
# define XPFPA_RESTORE() \
108108
_controlfp_s(&_xpfpa_fpu_cw, _xpfpa_fpu_oldcw, _MCW_PC)
109-
// We do NOT use the volatile return trick since _controlfp_s is a function
110-
// call and thus FP registers are saved in memory anyway. However, we do use
111-
// a variable to ensure that the expression passed into val will be evaluated
112-
// *before* switching back contexts.
109+
/* We do NOT use the volatile return trick since _controlfp_s is a function
110+
call and thus FP registers are saved in memory anyway. However, we do use
111+
a variable to ensure that the expression passed into val will be evaluated
112+
*before* switching back contexts. */
113113
# define XPFPA_RETURN_DOUBLE(val) \
114114
do { \
115115
double _xpfpa_result = (val); \
@@ -122,7 +122,7 @@
122122
XPFPA_RESTORE(); \
123123
return _xpfpa_result; \
124124
} while (0)
125-
// This won't work, but we add a macro for it anyway.
125+
/* This won't work, but we add a macro for it anyway. */
126126
# define XPFPA_RETURN_DOUBLE_EXTENDED(val) \
127127
do { \
128128
long double _xpfpa_result = (val); \
@@ -132,7 +132,7 @@
132132

133133
#elif defined(HAVE__CONTROLFP)
134134

135-
// float.h defines _controlfp
135+
/* float.h defines _controlfp */
136136
# include <float.h>
137137

138138
# define XPFPA_DECLARE \
@@ -146,17 +146,17 @@
146146
_xpfpa_fpu_oldcw = _controlfp(0, 0); \
147147
_controlfp(_PC_24, _MCW_PC); \
148148
} while (0)
149-
// NOTE: This will only work as expected on MinGW.
149+
/* NOTE: This will only work as expected on MinGW. */
150150
# define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \
151151
_xpfpa_fpu_oldcw = _controlfp(0, 0); \
152152
_controlfp(_PC_64, _MCW_PC); \
153153
} while (0)
154154
# define XPFPA_RESTORE() \
155155
_controlfp(_xpfpa_fpu_oldcw, _MCW_PC)
156-
// We do NOT use the volatile return trick since _controlfp is a function
157-
// call and thus FP registers are saved in memory anyway. However, we do use
158-
// a variable to ensure that the expression passed into val will be evaluated
159-
// *before* switching back contexts.
156+
/* We do NOT use the volatile return trick since _controlfp is a function
157+
call and thus FP registers are saved in memory anyway. However, we do use
158+
a variable to ensure that the expression passed into val will be evaluated
159+
*before* switching back contexts. */
160160
# define XPFPA_RETURN_DOUBLE(val) \
161161
do { \
162162
double _xpfpa_result = (val); \
@@ -169,17 +169,17 @@
169169
XPFPA_RESTORE(); \
170170
return _xpfpa_result; \
171171
} while (0)
172-
// This will only work on MinGW
172+
/* This will only work on MinGW */
173173
# define XPFPA_RETURN_DOUBLE_EXTENDED(val) \
174174
do { \
175175
long double _xpfpa_result = (val); \
176176
XPFPA_RESTORE(); \
177177
return _xpfpa_result; \
178178
} while (0)
179179

180-
#elif defined(HAVE__FPU_SETCW) // glibc systems
180+
#elif defined(HAVE__FPU_SETCW) /* glibc systems */
181181

182-
// fpu_control.h defines _FPU_[GS]ETCW
182+
/* fpu_control.h defines _FPU_[GS]ETCW */
183183
# include <fpu_control.h>
184184

185185
# define XPFPA_DECLARE \
@@ -202,9 +202,9 @@
202202
} while (0)
203203
# define XPFPA_RESTORE() \
204204
_FPU_SETCW(_xpfpa_fpu_oldcw)
205-
// We use a temporary volatile variable (in a new block) in order to ensure
206-
// that the optimizer does not mis-optimize the instructions. Also, a volatile
207-
// variable ensures truncation to correct precision.
205+
/* We use a temporary volatile variable (in a new block) in order to ensure
206+
that the optimizer does not mis-optimize the instructions. Also, a volatile
207+
variable ensures truncation to correct precision. */
208208
# define XPFPA_RETURN_DOUBLE(val) \
209209
do { \
210210
volatile double _xpfpa_result = (val); \
@@ -224,9 +224,9 @@
224224
return _xpfpa_result; \
225225
} while (0)
226226

227-
#elif defined(HAVE_FPSETPREC) // FreeBSD
227+
#elif defined(HAVE_FPSETPREC) /* FreeBSD */
228228

229-
// fpu_control.h defines _FPU_[GS]ETCW
229+
/* fpu_control.h defines _FPU_[GS]ETCW */
230230
# include <machine/ieeefp.h>
231231

232232
# define XPFPA_DECLARE \
@@ -246,9 +246,9 @@
246246
} while (0)
247247
# define XPFPA_RESTORE() \
248248
fpsetprec(_xpfpa_fpu_oldprec)
249-
// We use a temporary volatile variable (in a new block) in order to ensure
250-
// that the optimizer does not mis-optimize the instructions. Also, a volatile
251-
// variable ensures truncation to correct precision.
249+
/* We use a temporary volatile variable (in a new block) in order to ensure
250+
that the optimizer does not mis-optimize the instructions. Also, a volatile
251+
variable ensures truncation to correct precision. */
252252
# define XPFPA_RETURN_DOUBLE(val) \
253253
do { \
254254
volatile double _xpfpa_result = (val); \
@@ -312,9 +312,9 @@
312312
} while (0)
313313
# define XPFPA_RESTORE() \
314314
__asm__ __volatile__ ("fldcw %0" : : "m" (*&_xpfpa_fpu_oldcw))
315-
// We use a temporary volatile variable (in a new block) in order to ensure
316-
// that the optimizer does not mis-optimize the instructions. Also, a volatile
317-
// variable ensures truncation to correct precision.
315+
/* We use a temporary volatile variable (in a new block) in order to ensure
316+
that the optimizer does not mis-optimize the instructions. Also, a volatile
317+
variable ensures truncation to correct precision. */
318318
# define XPFPA_RETURN_DOUBLE(val) \
319319
do { \
320320
volatile double _xpfpa_result = (val); \
@@ -334,7 +334,7 @@
334334
return _xpfpa_result; \
335335
} while (0)
336336

337-
#else // FPU CONTROL
337+
#else /* FPU CONTROL */
338338

339339
/*
340340
This is either not an x87 FPU or the inline assembly syntax was not
@@ -350,6 +350,6 @@
350350
# define XPFPA_RETURN_SINGLE(val) return (val)
351351
# define XPFPA_RETURN_DOUBLE_EXTENDED(val) return (val)
352352

353-
#endif // FPU CONTROL
353+
#endif /* FPU CONTROL */
354354

355355
#endif

0 commit comments

Comments
 (0)