diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/calendar/cal_unix.c | 2 | ||||
-rw-r--r-- | ext/filepro/filepro.c | 14 | ||||
-rw-r--r-- | ext/ftp/ftp.c | 2 | ||||
-rw-r--r-- | ext/hyperwave/hw.c | 16 | ||||
-rw-r--r-- | ext/session/session.c | 2 | ||||
-rw-r--r-- | ext/standard/datetime.c | 16 | ||||
-rw-r--r-- | ext/standard/info.c | 2 | ||||
-rw-r--r-- | ext/standard/parsedate.y | 14 |
8 files changed, 34 insertions, 34 deletions
diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index f48243669c..3e4398a266 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -45,7 +45,7 @@ PHP_FUNCTION(unixtojd) t = time(NULL); } - ta = localtime_r(&t, &tmbuf); + ta = php_localtime_r(&t, &tmbuf); jdate = GregorianToSdn(ta->tm_year+1900, ta->tm_mon+1,ta->tm_mday); RETURN_LONG(jdate); diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c index 04c7da31f4..dbc9a78487 100644 --- a/ext/filepro/filepro.c +++ b/ext/filepro/filepro.c @@ -223,13 +223,13 @@ PHP_FUNCTION(filepro) } /* Get the field count, assume the file is readable! */ - if (strcmp(strtok_r(readbuf, ":", &strtok_buf), "map")) { + if (strcmp(php_strtok_r(readbuf, ":", &strtok_buf), "map")) { php_error(E_WARNING, "filePro: map file corrupt or encrypted"); RETURN_FALSE; } - FP_GLOBAL(fp_keysize) = atoi(strtok_r(NULL, ":", &strtok_buf)); - strtok_r(NULL, ":", &strtok_buf); - FP_GLOBAL(fp_fcount) = atoi(strtok_r(NULL, ":", &strtok_buf)); + FP_GLOBAL(fp_keysize) = atoi(php_strtok_r(NULL, ":", &strtok_buf)); + php_strtok_r(NULL, ":", &strtok_buf); + FP_GLOBAL(fp_fcount) = atoi(php_strtok_r(NULL, ":", &strtok_buf)); /* Read in the fields themselves */ for (i = 0; i < FP_GLOBAL(fp_fcount); i++) { @@ -241,9 +241,9 @@ PHP_FUNCTION(filepro) } new_field = emalloc(sizeof(FP_FIELD)); new_field->next = NULL; - new_field->name = estrdup(strtok_r(readbuf, ":", &strtok_buf)); - new_field->width = atoi(strtok_r(NULL, ":", &strtok_buf)); - new_field->format = estrdup(strtok_r(NULL, ":", &strtok_buf)); + new_field->name = estrdup(php_strtok_r(readbuf, ":", &strtok_buf)); + new_field->width = atoi(php_strtok_r(NULL, ":", &strtok_buf)); + new_field->format = estrdup(php_strtok_r(NULL, ":", &strtok_buf)); /* Store in forward-order to save time later */ if (!FP_GLOBAL(fp_fieldlist)) { diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 1a5e807e8b..98605d1e0e 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -635,7 +635,7 @@ ftp_mdtm(ftpbuf_t *ftp, const char *path) /* figure out the GMT offset */ stamp = time(NULL); - gmt = gmtime_r(&stamp, &tmbuf); + gmt = php_gmtime_r(&stamp, &tmbuf); gmt->tm_isdst = -1; /* apply the GMT offset */ diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index cc51a92830..612b143a46 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -316,7 +316,7 @@ int make2_return_array_from_objrec(pval **return_value, char *objrec, zval *sarr to the return_value array. */ temp = estrdup(objrec); - attrname = strtok_r(temp, "\n", &strtok_buf); + attrname = php_strtok_r(temp, "\n", &strtok_buf); while(attrname != NULL) { zval *data, **dataptr; long spec; @@ -372,7 +372,7 @@ int make2_return_array_from_objrec(pval **return_value, char *objrec, zval *sarr } } - attrname = strtok_r(NULL, "\n", &strtok_buf); + attrname = php_strtok_r(NULL, "\n", &strtok_buf); } if(NULL == sarr){ // spec_arr->refcount--; @@ -413,7 +413,7 @@ int make_return_array_from_objrec(pval **return_value, char *objrec) { /* Fill Array of titles, descriptions and keywords */ temp = estrdup(objrec); - attrname = strtok_r(temp, "\n", &strtok_buf); + attrname = php_strtok_r(temp, "\n", &strtok_buf); while(attrname != NULL) { str = attrname; iTitle = 0; @@ -468,7 +468,7 @@ int make_return_array_from_objrec(pval **return_value, char *objrec) { if(iGroup) add_next_index_string(group_arr, str, 1); } - attrname = strtok_r(NULL, "\n", &strtok_buf); + attrname = php_strtok_r(NULL, "\n", &strtok_buf); } efree(temp); @@ -507,7 +507,7 @@ int make_return_array_from_objrec(pval **return_value, char *objrec) { /* All other attributes. Make a another copy first */ temp = estrdup(objrec); - attrname = strtok_r(temp, "\n", &strtok_buf); + attrname = php_strtok_r(temp, "\n", &strtok_buf); while(attrname != NULL) { str = attrname; /* We don't want to insert titles, descr., keywords a second time */ @@ -521,7 +521,7 @@ int make_return_array_from_objrec(pval **return_value, char *objrec) { str++; add_assoc_string(*return_value, attrname, str, 1); } - attrname = strtok_r(NULL, "\n", &strtok_buf); + attrname = php_strtok_r(NULL, "\n", &strtok_buf); } efree(temp); @@ -1171,7 +1171,7 @@ php_printf("%s\n", ptr); } temp = estrdup(ptr); - attrname = strtok_r(temp, "\n", &strtok_buf); + attrname = php_strtok_r(temp, "\n", &strtok_buf); i = 0; while(attrname != NULL) { char *name; @@ -1245,7 +1245,7 @@ php_printf("%s\n", ptr); /* Add the user array */ zend_hash_index_update(return_value->value.ht, i++, &user_arr, sizeof(pval), NULL); - attrname = strtok_r(NULL, "\n", &strtok_buf); + attrname = php_strtok_r(NULL, "\n", &strtok_buf); } efree(temp); efree(object); diff --git a/ext/session/session.c b/ext/session/session.c index 8525162cc1..dff780ff72 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -485,7 +485,7 @@ static void strcat_gmt(char *ubuf, time_t *when) char buf[MAX_STR]; struct tm tm; - gmtime_r(when, &tm); + php_gmtime_r(when, &tm); /* we know all components, thus it is safe to use sprintf */ sprintf(buf, "%s, %d %s %d %02d:%02d:%02d GMT", week_days[tm.tm_wday], tm.tm_mday, month_names[tm.tm_mon], tm.tm_year + 1900, tm.tm_hour, tm.tm_min, tm.tm_sec); diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 76eaf70890..0eaeef7671 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -103,7 +103,7 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm) ** default parameters for PHP gmmktime would be the current ** GMT time values... */ - ta = localtime_r(&t, &tmbuf); + ta = php_localtime_r(&t, &tmbuf); /* Let DST be unknown. mktime() should compute the right value ** and behave correctly. Unless the user overrides this. @@ -221,9 +221,9 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) convert_to_string_ex(format); if (gm) { - ta = gmtime_r(&the_time, &tmbuf); + ta = php_gmtime_r(&the_time, &tmbuf); } else { - ta = localtime_r(&the_time, &tmbuf); + ta = php_localtime_r(&the_time, &tmbuf); } if (!ta) { /* that really shouldn't happen... */ @@ -489,7 +489,7 @@ PHP_FUNCTION(localtime) assoc_array = (*assoc_array_arg)->value.lval; break; } - ta = localtime_r(×tamp, &tmbuf); + ta = php_localtime_r(×tamp, &tmbuf); if (array_init(return_value) == FAILURE) { php_error(E_ERROR, "Cannot prepare return array from localtime"); RETURN_FALSE; @@ -536,7 +536,7 @@ PHP_FUNCTION(getdate) timestamp = (*timestamp_arg)->value.lval; } - ta = localtime_r(×tamp, &tmbuf); + ta = php_localtime_r(×tamp, &tmbuf); if (!ta) { php_error(E_WARNING, "Cannot perform date calculation"); return; @@ -566,7 +566,7 @@ char *php_std_date(time_t t) char *str; PLS_FETCH(); - tm1 = gmtime_r(&t, &tmbuf); + tm1 = php_gmtime_r(&t, &tmbuf); str = emalloc(81); if (PG(y2k_compliance)) { snprintf(str, 80, "%s, %02d %s %04d %02d:%02d:%02d GMT", @@ -658,9 +658,9 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) } format = (*format_arg)->value.str.val; if (gm) { - ta = gmtime_r(×tamp, &tmbuf); + ta = php_gmtime_r(×tamp, &tmbuf); } else { - ta = localtime_r(×tamp, &tmbuf); + ta = php_localtime_r(×tamp, &tmbuf); } buf = (char *) emalloc(buf_len); diff --git a/ext/standard/info.c b/ext/standard/info.c index bc6c633433..38be6c7c17 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -136,7 +136,7 @@ PHPAPI void php_print_info(int flag) SLS_FETCH(); the_time = time(NULL); - ta = localtime_r(&the_time, &tmbuf); + ta = php_localtime_r(&the_time, &tmbuf); if (flag & PHP_INFO_GENERAL) { #ifdef PHP_WIN32 diff --git a/ext/standard/parsedate.y b/ext/standard/parsedate.y index 819af8235d..f0a5e80f8a 100644 --- a/ext/standard/parsedate.y +++ b/ext/standard/parsedate.y @@ -556,13 +556,13 @@ int GetTimeInfo(TIMEINFO *Now) /* Now get the timezone if the last time < HH:00:00 <= now for some HH. */ if (NextHour <= Now->time) { - if ((tm = localtime_r(&Now->time, &tmbuf)) == NULL) + if ((tm = php_localtime_r(&Now->time, &tmbuf)) == NULL) return -1; secondsUntilNextHour = 60 * (60 - tm->tm_min) - tm->tm_sec; #if !defined(HAVE_TM_GMTOFF) /* To get the timezone, compare localtime with GMT. */ local = *tm; - if ((tm = gmtime_r(&Now->time, &tmbuf)) == NULL) + if ((tm = php_gmtime_r(&Now->time, &tmbuf)) == NULL) return -1; gmt = *tm; @@ -661,7 +661,7 @@ Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, tim return -1; Julian += tod; tod = Julian; - if (dst == DSTon || (dst == DSTmaybe && localtime_r(&tod,&tmbuf)->tm_isdst)) + if (dst == DSTon || (dst == DSTmaybe && php_localtime_r(&tod,&tmbuf)->tm_isdst)) Julian -= DST_OFFSET * 60 * 60; return Julian; } @@ -674,8 +674,8 @@ DSTcorrect(time_t Start, time_t Future) time_t FutureDay; struct tm tmbuf; - StartDay = (localtime_r(&Start,&tmbuf)->tm_hour + 1) % 24; - FutureDay = (localtime_r(&Future,&tmbuf)->tm_hour + 1) % 24; + StartDay = (php_localtime_r(&Start,&tmbuf)->tm_hour + 1) % 24; + FutureDay = (php_localtime_r(&Future,&tmbuf)->tm_hour + 1) % 24; return (Future - Start) + (StartDay - FutureDay) * DST_OFFSET * 60 * 60; } @@ -687,7 +687,7 @@ RelativeMonth(time_t Start, time_t RelMonth) time_t Month; time_t Year; - tm = localtime_r(&Start, &tmbuf); + tm = php_localtime_r(&Start, &tmbuf); Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; Year = Month / 12; Year += 1900; @@ -862,7 +862,7 @@ time_t parsedate(char *p, TIMEINFO *now) (void)GetTimeInfo(&ti); } - tm = localtime_r(&now->time, &tmbuf); + tm = php_localtime_r(&now->time, &tmbuf); yyYear = tm->tm_year + 1900; yyMonth = tm->tm_mon + 1; yyDay = tm->tm_mday; |