473,394 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Error ifndef _REENTRANT?

Does _REENTRANT mean that all of your code has to be reentrant? If I do:

#if __USE_UNIX98
mbstate_t mb;
...
mbrtowc(..., &mb)
#else
mbtowc(...)
#endif

Should I stick a #ifndef _REENTRANT error in there if the reentrant
version of mbrtowc isn't available? I don't know in advance that this
function will be called by multiple threads. What would you do in this
case?

Mike
Nov 14 '05 #1
3 2046
Michael B Allen wrote:

Does _REENTRANT mean that all of your code has to be reentrant?
Maybe. _REENTRANT isn't part of C.
#if __USE_UNIX98


I think you want a UNIX newsgroup.

--
pete
Nov 14 '05 #2
On Tue, 21 Sep 2004 08:33:04 -0400, pete wrote:
Michael B Allen wrote:

Does _REENTRANT mean that all of your code has to be reentrant?


Maybe. _REENTRANT isn't part of C.


Holy mackerel, I think you're right. I guess it's just another one of
those unwritten rules. Obviously a lot of stuff would break miserably
if standard library functions really weren't reentrant.

Yuck,
Mike
Nov 14 '05 #3
Michael B Allen wrote:

On Tue, 21 Sep 2004 08:33:04 -0400, pete wrote:
Michael B Allen wrote:

Does _REENTRANT mean that all of your code has to be reentrant?


Maybe. _REENTRANT isn't part of C.


Holy mackerel, I think you're right. I guess it's just another one of
those unwritten rules. Obviously a lot of stuff would break miserably
if standard library functions really weren't reentrant.


Standard library functions really aren't reentrant.

N869
7.1.4 Use of library functions
[#4] The functions in the standard library are not
guaranteed to be reentrant and may modify objects with
static storage duration.
--
pete
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kevin Grigorenko | last post by:
Okay, everything seems simple enough but I get the following Link error: TeXt.obj : error LNK2001: unresolved external symbol "private: static char * TextDB::TextDB::myVersion"...
16
by: Gernot Frisch | last post by:
hi, i don't even know how to desribe the error... I have a Qt application. Now, there's a .cpp file that I reduced to: // #include <somefile.h> int i=45; /* long source code
1
by: DiskMan | last post by:
System: Redhat 7.2 Kernel-2.6.11.8 GCC-3.4.3 CCC-6.5.9 Binutils-2.15 Make-3.80 GTK/GLIB-2.6.7 For some reason my Linux box is suddenly having issues trying to read ;
4
by: Scott Chang | last post by:
Hi all I copied the following VC++ 6.0 code (written by someone in the website) to my VC++ .Net 2002-Windows XP Pro PC ////****Solution 'dyndllclass' (2 projects)***/// ///***dynapp****(1st...
0
by: tsivaraman | last post by:
I am trying to build php-5.2.1 in RedHat Linux 9. I have installed libxml2-2.6.11,mysql-5.0.33,httpd-2.2.4(apache) successfully.When i do 'make' from the php directory,i get the following...
2
by: sydneytroz | last post by:
I'm getting a rather odd set of error messages when I try compiling the below code. I'm using the Dev-C++ IDE on WinXP, and am using a small driver program (unit-dev.cpp) to test the classes (it...
1
by: BSand0764 | last post by:
I'm getting an error that I can't seem to resolve. When I compile the Functor related logic in a test program, the files compile and execute properly (see Listing #1). However, when I...
12
by: jonatan | last post by:
Hello All, I am making a program and need the grt_main.c but i try to compile have the error c1004.Please help me how to solve it? Thank you. --------------------Configuration: pre - Win32...
6
by: zmee | last post by:
Hi, I'm doing a little game in OpenGL for college and I've got these 3 classes in C++: WarBalls - represents the Game's Application. It is supposed to be a singleton and holds all the Game's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.