<div dir="ltr">Even on Linux-Lab when I try to compile including <bsd/string.h> and using str_mode I get "undefined reference" error for str_mode. Am I supposed to be using any flags with gcc or something?<div>
<br></div><div>I installed libbsd-dev on my Ubuntu VM and I get the same error there. Undefined reference.</div><div><br></div><div>Any ideas?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 4:51 PM, Tejas Nadkarni <span dir="ltr"><<a href="mailto:tnadkarn@stevens.edu" target="_blank">tnadkarn@stevens.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks. I usually do the work on a local Ubuntu VM because it's faster than Linux Lab. Rarely have issues because the OS is same but I guess different packages and configs. </p>
<div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Oct 7, 2013 4:48 PM, "Jan Schaumann" <<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Tejas Nadkarni <<a href="mailto:tnadkarn@stevens.edu" target="_blank">tnadkarn@stevens.edu</a>> wrote:<br>
> It's weird in the even on the manpage for strmode it doesn't reference A or<br>
> a being returned for filetype.<br>
<br>
Correct. A platform that does not support these file types may not<br>
mention them in its manual page.<br>
<br>
> Also I don't appear to have the bsd/string.h on my system so will need to<br>
> fix that. That's why since I already have a function written to parse<br>
> st_mode I was hoping there was a value I could check for A or a.<br>
<br>
Well, if the platform supported this type, it'd probably provide macros<br>
such as _S_ARCH1 an _S_ARCH2. Your code would have to ifndef the<br>
relevant blocks around this to be portable, though. So in the end,<br>
using strmode(3) is the best solution.<br>
<br>
This is also an example of why it's useful to develop your program on<br>
the same platform on which it is intended to run --<br>
<a href="http://linux-lab.cs.stevens.edu" target="_blank">linux-lab.cs.stevens.edu</a>, in this case. The differences across unix<br>
variants can lead to frustrations otherwise.<br>
<br>
-Jan<br>
_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
</blockquote></div>
</div></div></blockquote></div><br></div>